Most of us have a hard enough time staying friends with our exes, never mind writing books with them. But that's exactly what Lisa Lutz and her onetime boyfriend, poet and editor David Hayward, have done. And the result is pure comic genius.

At the most basic level, Heads You Lose is what Lutz calls "a proper crime novel," something she says she'd never done before. "I'm always accused of being a crime novelist, but I'm not really," she says. Her bestselling series, which began with The Spellman Files (Simon & Schuster, 2007) and now includes Curse of the Spellmans, Revenge of the Spellmans, and The Spellmans Strike Again, all from Simon & Schuster, humorously chronicles a family of private investigators who are forever turning their detection skills on one another; dead bodies rarely appear.

In Heads You Lose a corpse shows up in the very first chapter and, as the title suggests, it's minus a head. The story's main characters are a pair of pot-growing siblings, Lacey and Paul, who have to solve this mystery with the help of a geriatric stoner who gets his pot delivered to his assisted living facility, a paranoid vet who's constantly disappearing to a treetop hideout in the woods, and an intellectual former stripper named Brandi, "the kind of woman who was always bleaching something."

But the plot is just the tip of the iceberg. The real main characters end up being the authors themselves. "Collaborating with Dave just seemed like a horrible, horrible idea," says Lutz, recalling her first reaction to their working together. "But then I thought, what if we just accepted that the collaboration wouldn't work from the start, and went with it?" After all, she adds philosophically, "We're really good at taking each other down. The insults just come flying."

Exhibit A: the book opens with an exchange of e-mails in which Lutz asks if Hayward would like to collaborate with her. "And no, I have not recently suffered a head injury," she snidely assures him. After some tendentious back-and-forth, they decide that Lutz will write a chapter, send it to Hayward, who'll write a chapter and send it back. There will be no plotting ahead of time and the two will never actually sit down in a room and work together. That way, they think, they won't fight. Well, think again. In footnotes and e-mail exchanges, the pair jostle over plot points and vocabulary, slinging insults, digging up old resentments, and energetically creating new ones, all to great comic effect.

One of the main battles takes place around the issue of vocabulary. Ever the effete poet, Hayward uses words like "foment" and "oleaginous," causing Lutz to wonder, "What was I thinking collaborating with an unpublished, narcissistic poet?" Hayward, for his part, snarks right back. "I'd argue that bringing a psycho to justice on the page and co-writing a book with one require different skill sets," he notes at one point. The arguments escalate until, by the end of the novel, it's all-out warfare, with each writer trying to prevent the other from ending the story the way he or she wants to.

As for how much of their on-the-page relationship is true to life? Both say they've portrayed it pretty accurately. "The Thanksgiving turkey thing is absolutely true," says Lutz, referring to an incident that pops up in the pair's e-mails. As she tells it, Hayward once invited her to his grandparents' farm in Northern California for the holiday. "Only once I accept does he tell me, ‘By the way, we're doing the cooking,' " she says, still incredulous. "And then he takes the turkey out of the oven too soon!" wails Lutz. "So I'm watching his 90-year-old grandparents eat it, sure it's gonna kill them!"

And Hayward's take on it? He shrugs. "She claims the turkey was pink, but I thought it was delicious." There are some things these authors will never agree on, even if they do—mostly—get along now. It's been a while since they dated in the mid-'90s and "a couple of years of silence were helpful," says Hayward. "We've grown up a little, too," he adds. Not too much, though, because what would be funny about that?n

Sasha Watson has written about books and the arts for Slate, ARTnews, and the Los Angeles Times. She is the author of Vidalia in Paris (Viking, 2008).