Post–White House, Joe Biden plays Dr. Watson to Sherlockian sleuth Barack Obama in Shaffer’s Hope Never Dies (Quirk, July).

What inspired you to turn President Obama and Vice President Biden into detectives?

The idea for a Joe Biden mystery had been percolating in my head ever since the first picture of him in aviators popped up online. I thought, this guy could be a modern-day Don Quixote. Originally, I had Biden blundering his way through secret missions around the world. It felt too goofy, so I shelved it. When the Obama/Biden bromance memes blew up, I returned to the idea and pitched the book that became Hope Never Dies to my agent.

Have you run the idea by Biden?

I met Joe Biden on his American Promise Tour this past December at a meet-and-greet for Biden Foundation donors. I had planned to mention the book to Biden then, but the person who was in line ahead of me told him an incredibly moving, personal story. Everyone within earshot was on the verge of tears. When Biden greeted me, the last thing on my mind was pitching my book to him.

Is it easier to write a fictionalized version of political figures you admire or those you don’t?

The difficult part of writing about someone you don’t admire is that it’s easy to demonize them. What you get then is a cackling villain, twirling their mustache at every dastardly deed they commit. That’s not good writing. It was a struggle to humanize Donald Trump, who was the antagonist in my satirical thriller The Day of the Donald. Of course, I heard from some readers who thought I made Trump too likable. For this book, it was hard to nail the tone. At first, it was too campy. My editor helped steer it in a different, slightly more realistic direction. Though the action is over the top at times, the focus is really on the characters.

The picture you present of their friendship is one that many admirers of theirs would hope is accurate.

I’ve read every behind-the-scenes book on the Obama White House, and the consensus seems to be that nobody knows what their friendship is like behind closed doors. There’s this writing advice that gets thrown around—“Write the book you want to read.” I wrote the book about their bromance that I wanted to read.