The Nasdaq composite rose 0.1 percent to notch a record close and a five-day winning streak.
The S&P 500 also eked out a record close, with energy rising more than 1 percent to lead advancers. The sector popped after the Energy Information Administration reported a larger-than-expected drawdown in crude barrels.
The Dow Jones industrial average ended about 35 points lower with Disney and Boeing contributing the most losses. The media giant's stock was on track for its biggest one-day decline since June after reporting weaker-than-expected quarterly sales. Boeing, meanwhile, tumbled to session lows after the firm said it is temporarily suspending 737 Max flights.
The reaction to Comey's firing in the market was largely muted because a large number of investors still believe the market will get tax reform at some point.
"The Republicans are a bit nervous but at the end of the day, most of them want to get tax reform through," said Robert Pavlik, chief market strategist at Boston Private Wealth. "But if we get wind that there's not going to be tax reform, ... that's when we get into some trouble."
Chris Zaccarelli, chief investment officer at Cornerstone Financial Partners, echoed Pavlik's remarks. "I don't think this is a make-or-break situation for tax reform," he said. "It would be more market-moving news if this were the final nail in the coffin for tax reform and the market doesn't believe that."