Former FBI Director James Comey has a book deal.

Flatiron Books told The Associated Press on Wednesday that Comey is writing a book about leadership and decision making that will draw upon his career in government.

Comey will write about experiences that made him the FBI's best-known and most controversial FBI head in recent times, from his handling of the bureau's probe into Hillary Clinton's private email server to allegations of ties between Russia and Donald Trump's presidential campaign.

Trump fired Comey in May and soon after told NBC News that he was angered by the FBI's investigation into 'this Russia thing with Trump and Russia,' which he called a fake story.

Lots to say: Publisher Flatiron Books pledged that Comey would tell the details about 'the highest-stakes situations in the past two decades' - meaning Russia and Hillary's emails

Payday: James Comey and his wife Patrice can expect millions for his deal with Flatiron books, an imprint of Macmillan. It said he would 'share yet-unheard anecdotes from his long and distinguished career'

Here's something they'll agree on: Neither Donald Trump or Hillary Clinton will welcome Comey's book, which will reflect on serving the country's leader and 'how these leaders have behaved under pressure'

Comey has since testified before Congress that Trump asked him to end an investigation into former National Security Adviser Michael T. Flynn and kept memos about his meetings with the president.

According to Flatiron, Comey will cite 'examples from some of the highest-stakes situations in the past two decades of American government' and 'share yet-unheard anecdotes from his long and distinguished career.'

The book is currently untitled and scheduled for next spring.

'Throughout his career, James Comey has had to face one difficult decision after another as he has served the leaders of our country,' Flatiron Publisher and President Bob Miller said in a statement.

'His book promises to take us inside those extraordinary moments in our history, showing us how these leaders have behaved under pressure.

'By doing so, Director Comey will give us unprecedented entry into the corridors of power, and a remarkable lesson in leadership itself.'

Comey was represented by Matt Latimer and Keith Urbahn of Javelin. Financial terms were not disclosed, but several publishers bid for the book and three officials with knowledge of the negotiations said the auction topped $2 million.

The officials asked not to be identified because were not authorized to discuss the book.

Comey was appointed as FBI director by President Barack Obama in 2013. On Tuesday, the Senate confirmed his successor, Christopher Wray, a former high-ranking official in President George W. Bush's Justice Department who oversaw investigations into corporate fraud.

DailyMail.com first revealed in June the frenzy of interest in the publishing world prompted by Comey's firing.

In the same stable: Flatiron Books is publishing Joe Biden's memoir Promise Me, Dad, and has previously published a collection of Oprah Winfrey's writing

At the time an acquisition editor for a major New York publishing house told DailyMail.com: 'Jim Comey's story has everything, from White House intrigue to possible corruption and law breaking.

'His explosive story makes "West Wing" and "House of Cards" on a par with Mister Rogers.

'When his proposal hits my desk, I've already been authorized to offer $10 million.'

The publisher of another key player in the book world revealed that major Hollywood producers are already lining up to make the torn-from-the-headlines blockbuster movie about Comey's life and his attempt to unseat the president.

A prominent movie-TV agent told DailyMail.com: 'I know one top drawer producer who's already talking to stars to cast the Comey role. He has to be tall, good-looking and a Jimmy Stewart-John Wayne-hero type. I was mesmerized when I spent the whole day watching Comey testify.

'Comey could expect a movie deal tied into the book worth many millions of dollars more, tens of millions.'

Flatiron is an imprint of Macmillan, the German-owned, historically British publishing house.

It is also publishing Joe Biden's memoir Promise Me, Dad, which is due in the autumn - a debut which will put him head-to-head with Hillary Clinton, whose What Happened is set to be the biggest book of 2017.

Other authors with works published by Flatiron include Oprah Winfrey, who published her What I Know For Sure collection with the imprint; Iron Chef judge Nigella Lawson; feminist Gloria Steinem; Trump-hating comedian Kathy Griffin; and late-night comedy host John Oliver.