In an interview that dominated its home page on Wednesday, Breitbart quoted a former assistant director of the bureau, James Kallstrom, saying of Mr. Comey, “He threw the reputation of the F.B.I. under the bus.” Mr. Kallstrom was also a guest on Fox News on Tuesday, telling the anchor Martha MacCallum that Mr. Comey “danced with the devil.”

Rachel Maddow’s monologue on MSNBC invoked the firing of Archibald Cox, President Richard M. Nixon’s special prosecutor during the Watergate scandal, one of many comparisons to Nixon’s so-called Saturday Night Massacre in the traditional news media. She then raised serious concerns that Mr. Trump was interfering with an investigation into his campaign’s ties to Russia.

Sean Hannity of Fox News expressed deep gratitude for the president’s action — “Comey Fired!!! Finally,” he posted on Twitter — and he said on the air that he hoped Mr. Comey’s replacement would reopen an investigation into Hillary Clinton’s emails. Fox News initially reported that Mr. Comey had resigned before correcting itself minutes later to make clear he was dismissed.

The Fox News worldview was echoed on Wednesday in the White House briefing room, where Sarah Huckabee Sanders, the deputy press secretary, defended Mr. Trump’s decision and denounced Mr. Comey as having “shown a lot of missteps and mistakes.”