Since July 2016, Comey has made controversial decisions, the FBI has investigated Hillary Clinton's emails and Russian interference in the U.S. election, and the Intelligence Community and Congress have both separately probed the Russia question as well. Each of these threads was an important strand that led to Tuesday's shakeup.
Here's a timeline of the pertinent events that resulted in Comey's firing.
September 4, 2013: Comey sworn in as director of the FBI
March 2, 2015: The New York Times reports that Clinton used a personal email server while she was secretary of state
July 24, 2015: Discovery of classified information on Clinton's server announced. The matter is then referred to the FBI
August 4, 2015: The Washington Post reports the FBI is investigating the security of Clinton's private email server
June 27, 2016: Attorney General Loretta Lynch meets with Bill Clinton. They later deny discussing the email investigation
July 1, 2016: Lynch announces she’ll accept the recommendation of the FBI and career prosecutors at the end of email investigation
July 7, 2016: Comey reiterates to the House Oversight Committee that Clinton "did not break the law"
July 2016: FBI opens an investigation into Russian attempts to influence the election, including probing any connections to Trump’s campaign. (This isn’t confirmed until months later when Comey testifies before Congress in March 2017)
September 28, 2016: Comey tells the House Judiciary Committee he doesn’t plan to re-open the investigation into Clinton
October 28, 2016: Comey announces the FBI is reviewing a new crop of emails related to the Clinton investigation that were found on former Rep. Anthony Weiner’s computer
November 6, 2016: Comey says the FBI has completed its review of the new batch of emails and did not change its findings on Clinton
November 8, 2016: Donald Trump defeats Hillary Clinton and is elected President of the United States
November 12, 2016: Clinton blames Comey for her defeat in a call with donors
November 13, 2016: On CBS "60 Minutes,” Trump says he hasn't decided whether to keep Comey
December 9, 2016: President Obama orders the intelligence community to review and report on Russia’s activity in the election
January 6, 2017: The Intelligence Community produces a report concluding, “Russian President Vladimir Putin ordered an influence campaign in 2016 aimed at the US presidential election. Russia’s goals were to undermine public faith in the US democratic process, denigrate Secretary Clinton, and harm her electability and potential presidency. We further assess Putin and the Russian Government developed a clear preference for President-elect Trump”
January 10, 2017: Senate intelligence Committee announces it will conduct an independent investigation of the intelligence community’s conclusion
January 12, 2017: The Justice Department Inspector General announces he will review the FBI’s handling of Clinton’s email case
January 25, 2017: House Intelligence Committee announces it will also open an investigation into Russia’s involvement in the election
March 20, 2017: Comey confirms before the House Intelligence Committee that the FBI is investigating whether the Trump campaign coordinated with Russia during the election
March 21, 2017: House Intelligence Committee leader Devin Nunes views classified documents on White House grounds, prompting calls for him to recuse himself from the investigation
March 22, 2017: Nunes announces that the intelligence community “incidentally collected” information about U.S. citizens involved in the Trump campaign, then goes to the White House to brief Trump
March 24, 2017: Nunes cancels a committee hearing set to feature former Acting Attorney General Sally Yates, former Director of National Intelligence James Clapper and former CIA Director John Brennan
April 27, 2017: Rod Rosenstein confirmed as Deputy Attorney General
May 2, 2017: Clinton again blames her loss on Comey’s Oct. 28 announcement, saying, "If the election were on Oct. 27, I would have been your president"
May 3, 2017: Comey defends his conduct in the Clinton email investigation before the Senate Judiciary Committee, testifying he feels “mildly nauseous” that his actions may have affected the election
May 8, 2017: Clapper and Yates testify before a Senate Judiciary subcommittee after Nunes canceled their previous scheduled hearing
May 9, 2017: Comey fired as FBI head