The Obama-Biden Bromance Continues. This Time in a Mystery Novel.

In the year and a half since Barack Obama left office, dozens of books have been written about his administration, including memoirs by his official photographer, stenographer, speechwriter, communications director, his foreign policy advisers and his director of national intelligence, not to mention the Obamas’ own forthcoming memoirs.

But only one book includes a scene where Obama bursts into a motorcycle gang clubhouse in Delaware, casually toting a sawed-off shotgun, to rescue Joe Biden from a mob of angry, heavily armed bikers.

“Looks like you all know who my pal is,” Biden tells his antagonists with satisfaction.

“He’s the guy who killed Bin Laden,” one of the stunned bikers says.

The unlikely scenario sprung from the twisted mind of Andrew Shaffer, author of “Hope Never Dies,” a new mystery novel starring the 44th president and his vice president as a pair of crime-busting amateur sleuths. It’s the first in a planned crime series, with Obama playing a cerebral, detached, analytical Holmes to Biden’s bumbling, impulsive Watson.

The novel, out this week, is a roughly 300-page work of political fanfiction, an escapist fantasy that will likely appeal to liberals pining for the previous administration, longing for the Obama-Biden team to emerge from political retirement as action heroes. But it’s also at times a surprisingly earnest story about estranged friends who are reunited under strange circumstances.

Image

Obama and Biden share a laugh at a basketball game on July 2012.CreditPatrick Smith/Getty Images

“It’s not a parody of action movies or thrillers, and it’s not a satire of their politics. It’s just a mystery novel starring these two well known characters, who just happen to be in the public domain,” said Mr. Shaffer, who has written cheeky satires like “The Day of the Donald: Trump Trumps America.”

It’s turning out to be a big summer for mysteries written by, or starring, former Democratic presidents. “The President Is Missing,” a political thriller former President Bill Clinton wrote with James Patterson, which features a fictional president confronting a cyberterrorism plot, shot to the top of the best-seller list after its release last month. Now, in “Hope Never Dies,” a fictional version of an actual former president confronts another pressing national problem, the opioid crisis.

The novel opens with Biden staring at his computer, stewing over paparazzi images of Obama parasailing off the coast of Cape Town. Like a jealous ex, he’s furious that Obama has cast him aside to pursue flashy leisure activities with his new celebrity best friends — BASE jumping with Bradley Cooper, kitesurfing in the British Virgin Islands with Richard Branson, kayaking with Justin Trudeau. “Eight years,” he mutters to his German shepherd, Champ, “And not even a gosh darned postcard.”

Image

Andrew Shaffer, the author of “Hope Never Dies.”CreditAndrew Spear for The New York Times

When Biden goes to investigate a flickering light he sees outside, he finds Obama lurking in the shadows, smoking a cigarette. Obama has come with grim news: Biden’s favorite Amtrak conductor, Finn Donnelly, had been found dead on the train tracks outside of Wilmington station, with a bag of heroin in his pocket. They decide to crack the case themselves.

Mr. Shaffer said the opening scene came to him in the weeks after Obama left office, when cable news anchors and late night hosts broadcast images of Obama on what looked like an endless global vacation.

“I was like, you know who would be mad about this? Joe Biden. He’s not out there windsurfing with Obama, someone else is,” he said. “It felt like he was auditioning for a new best friend. There has to be a misunderstanding for a buddy comedy to work.”

Image

In a touching moment in January 2017, Obama presented Biden with a Presidential Medal of Freedom. Both men choked up.CreditT.J. Kirkpatrick for The New York Times

As they attempt to untangle the mystery, Obama and Biden have run-ins with a biker gang, drug dealers and a corrupt cop. They try to shake Obama’s humorless secret service agent, wear ridiculous disguises and bicker like siblings. Biden puts on his aviator sunglasses, a Hawaiian shirt and a baseball cap with a gaping, embroidered fish that says “Kiss My Bass,” and gives Obama a Phillies cap, insisting that because Obama is known to be a White Sox fan, no one will recognize him. Obama chides Biden for being out of shape and for getting Jill a bouquet of lilies instead of roses, noting that lilies are for sympathy, and scolds him over his messy car. “Sorry that I don’t have the Secret Service to vacuum my car out, like some people,” Biden grumbles.

As much as they annoy each other, there’s palpable affection. One night, when they have to share a bed in a fleabag motel room and Biden can’t fall asleep, he makes Obama play “POTUS, SCOTUS or FLOTUS,” a game that involves naming three female politicians and picking which one you would elect president, nominate for the Supreme Court or marry. (Biden lists Nancy Pelosi, Elizabeth Warren and Hillary Clinton. Obama responds dryly: “Give me three different names.”)

Some scenes, like when Biden dangles by his fingers from a moving train, or Obama confronts the motorcycle gang, are a bit over the top, Mr. Shaffer admits.

“I’ve had some people say that when Obama comes in with a sawed-off shotgun, there’s no way he would do that,” he said. “I say, ‘Yeah, I know, but don’t you want to see it’?”

Image

Obama and Biden in the Rose Garden in 2016.CreditAl Drago/The New York Times

Mr. Shaffer had wanted to write a thriller starring Joe Biden ever since he saw an image of the vice president sporting his mirrored sunglasses.

“I thought, that guy looks like an action hero, then he opens his mouth and sticks his foot in it,” Mr. Shaffer said.

But the idea of casting Obama and Biden as a crime-fighting team didn’t strike him until after the 2016 election, when nostalgia was setting in, and memes memorializing the Obama-Biden bromance began flying around the internet — images of them drinking milkshakes, holding hands and high-fiving.

A week after Obama left the White House, Mr. Shaffer emailed his agent a one-sentence pitch for a new novel.

“A cozy mystery starring Joe Biden and Obama, together again, solving a murder at the Iowa State Fair,” he wrote.

“OMG,” his agent, Brandi Bowles, wrote back instantly.

She sent a proposal to Quirk Books, an offbeat independent publisher known for weird mash-ups like “Pride and Prejudice and Zombies.”

As it happened, Jason Rekulak, who was Quirk’s publisher at the time, had long wanted to publish a Joe Biden mystery series (his planned title: “A Strong Cup of Joe”) that would feature the vice president secretly solving crimes on the side. He liked Mr. Shaffer’s version even more.

“He had the idea for this Holmes-Watson dynamic, which was perfect,” Mr. Rekulak said.

Mr. Shaffer dashed off a draft in six months, but struggled with the tone. He listened to audiobooks narrated by the former president and vice president, and watched videos of their speeches. At first, he wrote alternating sections from Obama and Biden’s points of view, but writing from Obama’s perspective was too hard. “It’s impossible to get inside his head,” he said.

Biden — who is known to be garrulous and outspoken to the point of blundering — was easier, and made for a natural hard-boiled, slightly hokey narrator, who says things like “Son of a buttermilk biscuit,” “Jumpin’ Jesus on a pogo stick” and “Zap-bam-bingo, I’ve got it.”

Image

Shaffer met Biden last December, at an event to promote Biden’s memoir.CreditCourtesy of Andrew Shaffer

Mr. Shaffer said he planned to tell Mr. Biden about the book when he met him last December, at an event to promote Mr. Biden’s memoir. He had read that ice cream is Mr. Biden’s favorite food, so he ordered a T-shirt with a penguin eating an ice cream cone, and wore it to the event. When he got there, everyone else was dressed formally. As he waited in a line to meet Mr. Biden and tell him about the novel, the man in front of him gave Mr. Biden a medal he received for his son, who was killed in combat. “I was like, oh my God, I can’t say anything now,” said Mr. Shaffer, who never mentioned the book.