Peter Strzok's book, Compromised: Counterintelligence and the Threat of Donald J Trump, traces his career from respected counterintelligence agent to the man who came to embody the US president's scorn of the FBI and his characterisation of the Russia probe as a “witch hunt”.
Mr Strzok said it was “horrible” to be targeted by the president's public attacks.
He said he regrets that his texts created an opening for people to question the FBI's work and to bolster conspiracy theories.
The former agent said: “Being subjected to outrageous attacks up to and including by the president himself, which are full of lies and mischaracterisations and just crude and cruel, is horrible.
“There's no way around it.”
Mr Strzok's texts cost him his job and drew vitriol from Mr Trump.
But even among Trump critics, Mr Strzok is not a hero. His anti-Trump texts on a government phone to an FBI lawyer gave the US leader and his supporters a major opening to undercut the bureau's credibility as it was conducting one of the most consequential investigations in its history.
Mr Trump's attacks have continued even as two inspector general reports found no evidence that Mr Strzok's work in the investigations were tainted by political bias, and multiple probes have affirmed the Russia probe's validity.
Mr Strzok expresses measured regret for the texts in his book, which is due out on Tuesday.
He writes: “I deeply regret casually commenting about the things I observed in the headlines and behind the scenes, and I regret how effectively my words were weaponized to harm the Bureau and buttress absurd conspiracy theories about our vital work.”
Before becoming a virtual household name, Mr Strzok spent two decades at the FBI working in relative anonymity on sensational spy cases.
He helped uncover Russian sleeper agents inside the US, worked on the Edward Snowden case and led the investigation into whether Hillary Clinton mishandled classified information. (She did, he writes, but not in a way meriting prosecution).
After the Clinton case concluded in July 2016, Mr Strzok opened an investigation into whether the campaign of her Republican opponent was coordinating with Russia - conceiving the “Crossfire Hurricane” codename which he says proved prescient.
In the interview, Mr Strzok said he wanted his book to lend insight into the Clinton probe, Russian election interference and, “first and foremost, the counterintelligence threat that I see in Donald Trump”.
He added: “To do that, I wanted to show the reader what happened but also why they should believe me.”
As the investigation progressed, Mr Strzok came to regard the Trump administration's actions regarding Russia as “highly suspicious” and the president as compromised by Russia, partly because of financial dealings in Moscow about which, Mr Strzok asserts, Mr Trump repeatedly lied.
Those concerns deepened after Mr Trump sacked James Comey as FBI director and bragged to a Russian diplomat that “great pressure” had been removed.
The FBI began investigating whether Mr Trump himself was under Russia's sway, finding “too much smoke” to not look for fire, Mr Strzok writes.
“And the closer we got to the Oval Office, the stronger the smell seemed to become,” he said.
Special counsel Robert Mueller's investigation revealed significant contacts between the Trump campaign and Russia, but found insufficient evidence of a criminal conspiracy.
Mr Strzok documents pivotal moments during the investigation, recounting for instance how then-national security adviser Michael Flynn “baldly lied” to him and another agent about his Russian contacts even though Mr Flynn had not shown customary signs of deceit agents are trained to look for.
Though Trump supporters contend the interview was designed to get Mr Flynn to lie, Mr Strzok says the FBI actually gave him multiple prompts to refresh his memory.
While William Barr, the attorney general, has said the interview was done without a legitimate purpose, Mr Strzok says it was necessary to better understand the Trump orbit's ties to Russia and Mr Flynn's own “hidden negotiation with a foreign power that had just attacked our elections”.
Mr Flynn later pleaded guilty to lying to the FBI. Mr Barr's request to dismiss the case is pending.
Mr Strzok's stint on Mr Mueller's team was short-lived, upended in the summer of 2017 by the inspector general's discovery of anti-Trump text messages he had exchanged during the campaign with an FBI lawyer with whom he had had an extramarital relationship.
He was summoned to meet with Mr Mueller, who in a “soft voice” told Mr Strzok he was being removed.
Transferred into the more bureaucratic Human Resources Division, Mr Strzok says deputy director David Bowdich reassured him the situation could be worse, including if Mr Trump had gotten hold of the texts.
This is exactly what happened two months later when news broke about the texts and the US justice department disclosed them to reporters.
By his own count, Mr Strzok says, Mr Trump has attacked him since then more than 100 times in tweets.
The text message leak is part of a lawsuit from Mr Strzok, who also conveys discontent at how his career ended.
After the president accused Mr Strzok of treason, the former agent appealed to the FBI for a statement condemning the remarks, but received none.
The FBI scrambled to remove his access to categories of classified information so director Chris Wray could inform members of US congress the next day. Senior leadership overturned a lower-level decision in firing him.
“I can't talk in a lot of detail about that,” he added, “but I do think they returned those arrows to their quiver and made them better for this year.”
Join our commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies