In a letter to Comey, Trump said the firing was necessary to restore "public trust and confidence" in the FBI. Comey has come under intense scrutiny in recent months for his role in an investigation into Democrat Hillary Clinton's email practices, including a pair of letters he sent to Congress on the matter in the closing days of last year's election.
Trump made no mention of Comey's role in the Clinton investigation, which she has blamed in part for the election result that put him in the White House. But in announcing the firing, the White House circulated a scathing memo, written by deputy Attorney General Rod Rosenstein, criticizing Comey's handling of the Clinton probe, including the director's decision to hold a news conference announcing its findings and releasing "derogatory information" about Clinton.
The firing of an FBI director is exceedingly rare. Democrats slammed the move, comparing it to President Richard Nixon's "Saturday Night Massacre" decision to fire the independent special prosecutor overseeing the Watergate investigation, prompting the resignations of the Justice Department's top two officials.
RELATED: Key moments the led up to Comey's firing
"This is Nixonian," Sen. Bob Casey, D-Pa., declared on Twitter. "Outrageous," said Oregon Sen. Ron Wyden, calling for Comey to immediately be summoned to testify to Congress about the status of the Trump-Russia investigation
Trump has ridiculed the FBI investigation, as well as concurrent congressional investigations, as a "hoax" and has denied that his campaign was involved in Russia's election meddling. In his letter to Comey, he asserted that the FBI director had informed him "on three separate occasions that I am not under investigation."
The White House said the search for a new FBI director was beginning immediately.
Tuesday's stunning announcement came shortly after the FBI corrected a sentence in Comey's sworn testimony on Capitol Hill last week. Comey told lawmakers that Huma Abedin, a top aide to Hillary Clinton, had sent "hundreds and thousands" of emails to her husband's laptop, including some with classified information.
On Tuesday, the FBI said in a two-page letter to the Senate Judiciary Committee that only "a small number" of the thousands of emails found on the laptop had been forwarded there while most had simply been backed up from electronic devices. Most of the email chains on the laptop containing classified information were not the result of forwarding, the FBI said.
Some lawmakers welcomed news of the dismissal.
"Given the recent controversies surrounding the director, I believe a fresh start will serve the FBI and the nation well," said Republican Lindsay Graham of South Carolina, chairman of a Senate Judiciary subcommittee investigating the Russian campaign interference.
Sen. Dianne Feinstein of California, the top Democrat on the Judiciary Committee, said Trump called her Tuesday afternoon to inform her of his decision.
"The next FBI director must be strong and independent and will receive a fair hearing in the Judiciary Committee," she said in a statement.
Comey, 56, was nominated by President Barack Obama for the FBI post in 2013 to a 10-year term. That appointment does not ensure a director will serve the full 10 years, though Comey is only the second FBI chief to be fired.
Praised by both parties for his independence and integrity, Comey has spent three decades in law enforcement.
But his prominent role in the 2016 presidential campaign raised questions about his judgment and impartiality. Though the FBI did not recommend charges against Clinton for mishandling classified information, Comey was blisteringly critical of her decision to use a personal email account and private internet sever during her four years as secretary of state.
Clinton has partially blamed her loss on Comey's disclosure to Congress less than two weeks before Election Day that the email investigation would be revisited. He later said the FBI, again, had found no reason to bring any charges.
Trump disagreed with her assessment, tweeting that Comey actually "was the best thing that ever happened to Hillary Clinton in that he gave her a free pass for many bad deeds!"
Clinton's advisers were stunned by Trump's decision. Former campaign spokesman Brian Fallon said that while he believed Comey "inflicted severe damage" on the FBI, "the timing and manner of this firing suggest that it is the product of Donald Trump feeling the heat on the ongoing Russia investigation and not a well thought out response to the inappropriate handling of the Clinton investigation."
Before the past months' controversies, Comey was perhaps best known for a remarkable 2004 standoff with top officials in the George W. Bush administration over a federal domestic surveillance program.
As the deputy attorney general, Comey rushed to the hospital bed of Attorney General John Ashcroft to physically stop White House officials in their bid to get his ailing boss to reauthorize a secret no-warrant wiretapping program.
Comey described the incident in 2007 testimony to Congress, explaining that he believed the spy program put in place after the Sept. 11, 2001, terror attacks was legally questionable.
When he learned that Andrew Card, the president's chief of staff, and Alberto Gonzales, the White House counsel, were heading to Ashcroft's hospital room despite Ashcroft's wife's instructions that there be no visitors, Comey told Congress, Comey beat them there and watched as Ashcroft turned them away.
"That night was probably the most difficult night of my professional life," Comey said.
AP writers Darlene Superville, Ken Thomas, Vivian Salama, Catherine Lucey and Sadie Gurman contributed to this report.
Send a breaking news alert
Report a correction or typo
Learn more about the 6abc apps