"The president has accepted the recommendation of the Attorney General and the deputy Attorney General regarding the dismissal of the director of the Federal Bureau of Investigation," Spicer told reporters in the briefing room.
Spicer also said that Comey was "notified a short time ago." This is effective "immediately," he said.
Earlier in the day, the FBI notified Congress that Comey misstated key findings involving the Hillary Clinton email investigation during testimony last week, saying that only a "small number'' of emails had been forwarded to disgraced congressman Anthony Weiner, not the "hundreds and thousands'' he'd claimed in his testimony.
The letter was sent to the Senate Judiciary Committee on Tuesday, more than a week after Comey testified for hours in defense of his handling of the Clinton probe.
"This letter is intended to supplement that testimony to ensure that the committee has the full context of what was reviewed and found on the laptop,'' wrote FBI Assistant Director Gregory Brower.
In defending the probe at last week's hearing, Comey offered seemingly new details to underscore the seriousness of the situation FBI agents faced last fall when they discovered thousands of Clinton aide Huma Abedin's emails on the computer of her husband, Anthony Weiner.
"Somehow, her emails were being forwarded to Anthony Weiner, including classified information," Comey said, adding later, "His then-spouse Huma Abedin appears to have had a regular practice of forwarding emails to him for him I think to print out for her so she could then deliver them to the secretary of state."
At another point in the testimony, Comey said Abedin "forwarded hundreds and thousands of emails, some of which contain classified information.''
Neither of those statements is accurate, said people close to the investigation.
Tuesday's letter said "most of the emails found on Mr. Weiner's laptop computer related to the Clinton investigation occurred as a result of a backup of personal electronic devices, with a small number a result of manual forwarding by Ms. Abedin to Mr. Weiner.''
The letter also corrected the impression Mr. Comey's testimony had left with some listeners that 12 classified emails were among those forwarded by Abedin to Weiner.
"Investigators identified approximately 49,000 emails which were potentially relevant to the investigation," the letter said. "All were reviewed with a particular focus on those containing classified information. Investigators ultimately determined that two e-mail chains containing classified information were manually forwarded to Mr. Weiner's account.''
Ten other emails chains that contained classified information were found on the laptop as a result of backup activity.
The letter also clarified some of the figures Comey gave regarding ongoing terrorism probes.
The issue of Comey's misstatements was first reported by ProPublica.
At the hearing, the statements about Abedin's email practices were immediately seized on by Sen. Ted Cruz, R-Texas, and others, who demanded to know why Abedin wasn't charged with a crime. Comey said it was difficult finding evidence those involved in Clinton's use of private email knowingly engaged in wrongdoing, and that traditionally the Justice Department has not prosecuted such cases without some indicator of intent.
Comey's incorrect comments about Abedin surfaced again this week at a different Senate hearing, when Cruz pressed former director of national intelligence James Clapper Jr. to say how he would handle an employee who "forwarded hundreds or even thousands of emails to a non-government individual, their spouse, on a non-government computer.''
Clapper said such conduct "raises all kinds of potential security concerns.''
At the hearing last week, Comey spent hours defending his handling of the investigation of Clinton's use of a private server for work while she was secretary of state, saying it made him "mildly nauseous" to think his decisions might have affected the outcome of the presidential election, but insisting that he had no regrets and would not have handled it differently.
Comey's decision-making during the Clinton inquiry has come under sustained criticism from Democrats - including Clinton - who say it was a major factor that contributed to her presidential election defeat in November to Donald Trump. On Oct. 28, less than two weeks before Election Day, the director notified Congress that new Clinton-related emails had been found on a laptop belonging to Weiner.
Days later, investigators obtained a search warrant to examine about 3,000 messages on the device that were work-related. Of those, Comey said, agents found a dozen that contained classified information, but they were messages investigators had already seen.
Comey's public comments about the Clinton case have been a source of public debate since he first announced last July that he would not recommend charges against anyone in connection with her use of a private server for government business.
At the time, he called the use of the server "extremely careless'' but said it did not rise to the level of a crime.
The misstatements in testimony aren't the first time Comey has overstated a key fact in a high-profile probe.
A year ago, while speaking at a security forum in London, the director miscalculated the price the FBI had paid for a technique to crack into a locked iPhone belonging to one of the dead suspects in a terrorist attack in San Bernardino, California.
At the event, he said the cost of the phone hacking tool was "more than I will make in the remainder of this job, which is seven years and four months, for sure.'' Based on Comey's salary, his comment strongly implied the bureau paid at least $1.3 million to get into the phone, which belonged to Syed Rizwan Farook. Farook and his wife killed 14 people during a December 2015 terrorist attack.
People close to that case said the FBI actually paid about $900,000.