From roughly the end of September 2010 to the following February, an anonymous Chicago writer used a fake Twitter account to parody Rahm Emanuel’s campaign for mayor of Chicago. Feeding off the popular mythology around Emanuel’s legendary foulmouthed political power brokering, @MayorEmanuel—we now know it was former Chicago journalism professor and new media developer Dan Sinker—produced a daily, if not hourly, stream of dementedly insightful, hilariously profane tweets on politics, popular culture, the Chicago Bears and the politicians and local peculiarities inherent in running for mayor of Chicago.

Against all odds, this strange episode in “real-time storytelling” has been collected into a book. Dan Sinker’s The F***ing Epic Twitter Quest of @MayorEmanuel will be published by Scribner. The book is an eccentric portrait of that six-month period, documenting the irresistibly comic parallel universe of the Chicago mayoral race and @MayorEmanuel, Rahm Emanuel’s online doppelgänger. It’s an absurdist Twitter-driven roadtrip-of-the-mind (so inventively profane we can barely find family-friendly quotes) that has redefined the nature of political satire for the social media generation. Indeed, @MayorEmanuel became a sensation in Chicago and a Twitter phenomenon—nearly 50,000 followers including 8,000 in one day—as politicians, the press, and his followers tried to figure out just who was doing the tweeting. @MayorEmanuel on Chicago: “You know what’s wrong with Chicago? Every F***ing thing.”

“I was the last one to be convinced it could be a book,” Sinker says from his home in Chicago. “It blurs the line between fiction and nonfiction, truth and lies. It’s annotated fiction,” Sinker says, describing the book and laughing. “It’s the story of a guy’s journey to achieve what he thought he wanted, though it turns out to be his undoing.” Sinker alludes to the oddly affecting metaphysical ending of a thoroughly outrageous book. “It’s the story of a selfish person who does an unselfish thing.”

The fictional @MayorEmanuel appears in the book just as the real Rahm announces he’s running for mayor of Chicago, assembling a staff that includes a fake David Axelrod (“Axelrod’s Mustache can do the f***ing listening tour on its own tomorrow”), a duck named Quaxelrod, Carl the Intern, and Hambone the dog (“Hambone is f***ing sharp. Really good debate advice”).

@MayorEmanuel isn’t Sinker’s first effort using online media to communicate and entertain. Sinker, who is now director of the Knight Mozilla News Technology Partnership in Chicago, published Punk Planet magazine for years before teaming with Akashic Books publisher Johnny Temple (who also helped him place the book with Scribner) and publishing eight books under Akashic’s Punk Planet imprint. Later Sinker launched Cell Stories, a mobile Web site optimized for smartphone browsers that published new, quirky, always engaging fiction on a weekly basis online.

But @MayorEmanuel is different, “written” mostly on a smartphone while he rode to work on Chicago’s elevated trains. Sinker improvised its scatological tweets from campaign headlines and information on the Web sites, Facebook pages, and Twitter accounts of the politicians running for mayor. His tweets also took followers on a tour through Chicago’s wards, bars, and eateries, surveying quirky local delicacies (“I refuse to choke down another f***ing pepper and egg sandwich. Seriously, how has this entire city not died from a coronary?”) and much more. Not to mention @MayorEmanuel’s account of watching a Bears-Packers football game on TV with “Kanye West” (“Kanye showed up with the same f***ing Motorola headsets the coaches have. We’re all wearing them. We look f***ing awesome”).

“It was way more linear than I thought,” Sinker says. “I banged it out on my phone, no notes or anything. I never looked back on anything—it’s a pain to try and look back on Twitter—so things sometimes changed later in the story.” Thrilled that his tweets were getting attention, he was terrified of pissing off the real Emanuel, who actually turned out to like it, eventually offering a donation—Sinker called it a “bounty”— to a charity if the anonymous @MayorEmanuel would step forward.

“I didn’t want the publicity,” says Sinker, who at first was afraid he’d get fired. “It was fun. I was glad people liked it, but it spiraled into a bigger thing. It was out of my control, and my identity was the only thing I could control.” Eventually Sinker was discovered by two people: a reporter for the Atlantic, who talked him into telling his story publicly, and a 25-year-old Teach for America instructor, who discovered his identity by following his digital tracks, but quickly assured Sinker he wouldn’t spoil the fun before he could bring the story to an end.

It all ended—Sinker called it a “media circus”—when Emanuel was elected mayor. The real Emanuel presented a charity donation check to Sinker, who was unveiled at a packed press conference in Chicago and later appeared on The Colbert Report. But before that press conference, @MayorEmanuel also disappeared—with a little help from a fictional Mayor Daley—into the storytelling ether. We won’t spoil the ending if you didn’t follow it on Twitter. You’ll have to read the book.

Sinker says the experience has shown how Twitter, like other new technologies, has matured, developing into a virtual tool and an eccentric but effective storytelling medium. “As these digital tools mature, people figure out all sorts of things to do with them that no one had thought to do before. @MayorEmanuel wasn’t the first fake Twitter persona to be presented as literature,” Sinker said. “It just hit all the right points in a way that worked like it hadn’t before.”