Barack Obama on the Daily Show with Jon Stewart. Photograph: Olivier Douliery/Empics

The Social Network, the film whose title has been changed by deed poll to "the Facebook movie", tells the story of a short, nebbishy nerd who steals the glory from a taller and once more glamorous prospect. On Wednesday night, America got to watch this dynamic played out for real when Jon Stewart interviewed Barack Obama on The Daily Show, the TV programme to which liberal America prays nightly.

"This is going to be awesome!" Stewart giggled in the promotional adverts. But as Stewart watchers know, the amount of silliness their guru expresses on screen is in inverse proportion to the anger he actually feels. Not since Abraham Lincoln settled in at the theatre has an American leader's expectations of a comfortable night of entertainment been proven so disastrously wrong.

Initially, it looked all promising for Obama. He arrived so smooth and dude-like it could have been 2007 all over again, giving a combination high five/handshake to Stewart (who stepped back quickly, possibly to curtail unfortunate height comparisons), to more applause than Stewart got. Two nil to the president.

There was then sparring about Stewart's overly ornate set. Two one. Finally, some to-ing and fro-ing about a mug of water on the desk that Obama definitely won. Three one. But that mug of water turned out to be Obama's final triumph of the night.

No, the president replied, his fingernails shredding as he slipped from the precipice. It would be "yes we can but" and with that, the nerd had toppled the school jock, and the credits rolled. But even before Obama plunged upon the sword that Stewart had deftly planted, there were signs of the impending assassination. In truth, Stewart was softer on Condoleezza Rice, who recently appeared on his show, than he was on Obama. But then, there is no heart more bitter than that of a disappointed lover.

"We've done a lot of stuff that people don't know about," began Obama.

"What," pounced Stewart, with more than a soupcon of mockery, "have you done that people don't know about?"

There was then a series of explosions as the heads of the liberals who make up Stewart's audience imploded trying to figure out who they were supposed to root for.

"You ran with such audacity but, legislatively it has felt, um, timid," continued Stewart.

Obama leaned in like a schoolmaster, still not understanding that here was an unappeasable foe. He had a "profound disagreement" with that and, while he "didn't want to lump [Stewart] in with a lot of other commentators …" Stewart was visibly riled, not at being corrected but at being seen as just one of many talking heads, and it was like that moment in The Social Network when Zuckerberg realises he must destroy those Winklevosses. He is NOT just another nerd who can be bought off by high rhetoric.

"I don't want to lump you in with other presidents, but …" Stewart retaliated, accusing Obama of merely "papering over" corrupt systems instead of transforming them. Obama continued to try to defend himself.

As any Republican could have told him, attacking the enemy is the best form of defence. Yet he refused to take this obvious tactic, standing instead on the back foot, which not only adds at least 10 pounds on camera but probably takes away at least 15 voter points.

He may feel that he is above making jokes about non-masturbating witches standing for office, but the higher the road he takes, the greater the suicidal plunge.

Instead, viewers were left with the feeling of yes. But.

Sign up for the Guardian Today

Our editors' picks for the day's top news and commentary delivered to your inbox each morning.