Andrew G. McCabe is unemployed.

After 22 years at the Federal Bureau of Investigation, McCabe was fired as deputy director in March 2018. Like so many federal employees working under this reality-TV-show presidency, he was told “You’re fired!” by Donald Trump, and in his case, just hours before he was eligible for early retirement benefits. McCabe was forced to launch a new career as an author. His book, “The Threat: How the FBI Protects America in the Age of Terror and Trump,” hit the best-seller lists when it was first released in February and provides a clear-eyed insider’s view of a chaotic White House, with lots of rich stories about busting organized crime rings along the way.

McCabe will be the keynote speaker at the Pilgrim Monument and Provincetown Museum on Sunday, June 16, at the Provincetown Film Society’s annual Evan Lawson Filmmakers Clambake Brunch, and he’ll sit down for a conversation with Casey Sherman, who is author of “Boston Strong,” about the Boston marathon bombings. McCabe was the lead investigator on that case.

The theme of the discussion is “speaking truth to power,” which McCabe certainly has experience doing, having frequently criticized the president of the United States in his book and in the national media since its publication. It has been a rewarding, if unexpected, “post-bureau” life, he told the Banner on Friday.

McCabe, who is 51, practiced law before deciding to indulge his true obsession and become a G-man.

“I knew what interested me in law school was the criminal side of the law,” he said. “The civil side was just people arguing over money, and that doesn’t motivate me. I took all these classes that related to passion, power, violence — compelling stories of human drama.”

McCabe rose through the ranks of agents to become deputy director in 2016.

There he was in the number two position when Trump fired FBI Director James Comey on May 9, 2017, less than two months after Comey told Congress that the bureau is investigating a possible connection between the Trump campaign and Russia’s efforts to influence the 2016 presidential election.

McCabe described being called to the Oval Office, where Trump informed him that Comey had just been dismissed. It was the first conversation McCabe had ever had with the president.

“It was chaotic and overwhelming, and I was focused on keeping 37,000 people [FBI employees] going forward and doing the right thing,” McCabe said. “I’ve often thought of all the ridiculous things he said to me that night. It would have been more satisfying to say some things back. But at the end of the day, I think I did the right thing by staying focused on going forward.”

During a second meeting with Trump, the president asked McCabe whom he voted for in the presidential election.

“I dodged the question,” McCabe said.

In their final meeting, when McCabe was interviewed for the director’s job, he asked the president to go back to the topic of his vote. At which point McCabe said he told Trump, “I had voted for every other Republican presidential candidate, but I didn’t vote for him. I didn’t vote at all in the 2016 election. And he just stared at me and just looked to one side and shrugged his shoulders and moved on. I don’t know if there was anything to be gained. He is a guy who won’t listen to anything he doesn’t want to hear.”

Jeffrey Toobin of The New Yorker wrote that “McCabe’s book speaks with bracing directness about what was going on, and why it matters ... anyone who has followed Trump will recognize the accuracy of the portrayal of him in ‘The Threat.’ ”

In the days after Comey’s firing, McCabe knew he would never be made the permanent director and would not be the acting director for long. He said that he asked his team what needed to be done to protect the investigative materials that had been built up regarding possible Russian influence in the election. McCabe didn’t want the work to be buried, due to its unpopularity at the White House.

“So they said the one thing we have to do is open a case against the president,” McCabe said. “And so I did that, knowing full well that I would probably suffer greatly from it.”

And suffer he did.

Almost a year after Comey’s firing, McCabe was dismissed by Jeff Sessions, then the Attorney General, who said that “McCabe had made an unauthorized disclosure to the news media and lacked candor — including under oath — on multiple occasions.” McCabe said the investigation of him was “bogus,” and he is suing.

“I’m bringing a federal civil lawsuit to re establish my good standing and health benefits — I was fired 26 hours before I was eligible for them,” McCabe said. “I think it was political, unfair and biased.”

Speaking truth to power isn’t so hard, McCabe said, even for a career FBI agent who is trained to respect authority and the chain of command. Investigators, he said, gather facts to “educate not influence.” The FBI “thrives on the information we collect.”

McCabe often talks about the importance of “staying true to the barest essentials of your beliefs, even though that will affect you negatively.”

Still, he couldn’t predict just how badly he would be affected by his commitment to investigate the president.

“I didn’t think I would get fired by a bogus report 26 hours before I would be eligible for retirement,” he said. “That took creativity.”