Searching on JetBlue, I was able to find seats departing ORD on Tuesday, July 3, and returning from BOS on Thursday, July 5, 2018, perfectly straddling the 4th of July. If you already have plans for the 4th, then no worries because this fare is available from May through late September at this price. There will be a few random days where you can find an outlier, but for the most part, you'll need to travel on Tuesday or Wednesday at this price.
If you're a Southwest aficionado, you can choose to fly them from Midway to Boston for $98 round-trip throughout the summer dates too, but flights during the 4th of July week were a smidge more in price.
Need a room in Beantown? Here's a list of available hotels for the 4th of July week on Hotelwatchdog.