Former Manhattan U.S. Attorney Preet Bharara, who earned a reputation for fighting crime on Wall Street and public corruption before President Donald Trump fired him in March, has signed a book deal with Alfred A. Knopf.

The book, as yet untitled, is about "the search for justice, not just in criminal cases but in life and society in general," Knopf said in a statement on Thursday. Publication is expected in January 2019.

Bharara said his book would be about the law, "integrity, leadership, decision making, and moral reasoning."

"It addresses what it means to do the right thing, how to avoid doing the wrong thing, and the role of thoughtfulness in making the best choice," Bharara said in a statement.

In 2009, President Barack Obama appointed Bharara to serve as U.S. Attorney for the Southern District of New York, which includes Manhattan.

During seven and a half years as the chief federal prosecutor in that region, Bharara oversaw several notable corruption and white-collar criminal cases, as well as prosecutions of terrorism suspects.

"Preet Bharara's life experience, coupled with his standing as a U.S. Attorney and the cases he tried as prosecutor, makes him uniquely qualified to write this book," said Sonny Mehta, editor-in-chief for Knopf, which is a division of Penguin Random House.

Bharara, now a distinguished scholar in residence at New York University's law school, was unexpectedly fired by Trump on March 11 after refusing to step down. He had been among 46 U.S. attorneys who were told a day earlier to submit their resignations.

In November, Bharara met with Trump at Trump Tower in New York City, three weeks after the presidential election, and said at the time that they had a "good meeting" and he agreed to remain in his post as a federal prosecutor."

He was fired a few months later. This month, Bharara told ABC News in an interview that he received "unusual" phone calls from Trump after the election that made him uncomfortable. He said he was fired after declining to take the third call.

Bharara said he believed Trump's calls to him violated the usual boundaries between the executive branch and independent criminal investigators.

Knopf spokesman Paul Bogaards said on Thursday that Bharara "addresses the circumstances of his firing in the book proposal." Whether the book itself goes into the details of Bharara's firing "remains an open question," Bogaards said.

(Reporting by Nate Raymond in Boston and Gabriella Borter in New York; Editing by Toni Reinhold and Howard Goller)