Murdoch, the News Corp chairman and chief executive, was forced to court Obama after the rising star of US politics rebuffed his initial approaches, it is believed because of what he saw as the derogatory coverage of him and his wife, Michelle, on Fox News, according to Michael Wolff.

The News Corp boss also advised Wolff, his biographer, to vote for the man who eventually became the Democratic presidential candidate during the New York primary earlier this year, saying: “He’ll sell more papers.”

These revelations are reported in the October edition of Vanity Fair magazine, which details contributing editor Wolff’s interviews with Rupert Murdoch over a period of nine months for his upcoming biography of the media mogul, The Man Who Owns the News.

After initially snubbing offers of a get-together with the media tycoon, made through the Kennedy family, Obama relented and a secret courtesy meeting with Murdoch was arranged at the Waldorf-Astoria Hotel in New York, according to Wolff.

When Obama eventually met Murdoch early this summer in secret, they were joined by Ailes, who runs News Corp’s Fox News Channel.

Wolff reported in Vanity Fair that during the meeting Obama and Murdoch sat knee to knee, with the older man offering the prospective candidate advice.

“Murdoch, for his part, had a simple thought to share with Obama. He had known possibly as many heads of state as anyone living today – had met every American president from Harry Truman on – and this is what he understood: nobody got much time to make an impression. Leadership was about what you did in the first six months,” wrote Wolff.

But Wolff claimed things were different when Ailes took Murdoch’s place.

“Obama lit into Ailes. He said that he didn’t want to waste his time talking to Ailes if Fox was just going to continue to abuse him and his wife, that Fox had relentlessly portrayed him as suspicious, foreign, fearsome – just short of a terrorist,” he wrote.

“Ailes, unruffled, said it might not have been this way if Obama had more willingly come on the air instead of so often giving Fox the back of his hand.

“A tentative truce, which may or may not have vast historical significance, was at that moment agreed upon.”

In the Vanity Fair article Wolff also claimed that Murdoch advised him to vote for Obama during the democratic primaries.

“Just before the New York Democratic primary, when I found myself undecided between Clinton and Obama, I said to Murdoch (a little flirtation, like a little gossip, softens him), ‘Rupert, I don’t know who to vote for – so I’m going to give you my vote. You choose’,” he wrote.

Murdoch courting Obama marks something of role reversal from the mid-1990s, when UK prime minister-in-waiting Tony Blair actively courted Murdoch as part of his bid for power.

“This is a leap for Murdoch. Murdoch has traditionally liked politicians to come to him. His historic shift in the 1990s to Tony Blair came after Blair made a pilgrimage to Australia,” wrote Wolff.

“Obama, on the other hand, was snubbing Murdoch. Every time he reached out (Murdoch executives tried to get the Kennedys to help smooth the way to an introduction), nothing. The Fox stain was on Murdoch.”

However, the “Fox stain”, as Wolff calls it, does not appear to be one that Murdoch is so comfortable with any more.

Wolff wrote that the influence of Murdoch’s wife Wendi and the courting of more liberal figures in the media has raised a conflict in the News Corp founder, as he would love to build on his purchase of the Wall Street Journal by taking over the New York Times.

“He is spending time now in consideration of an even more far-fetched fantasy, the New York Times: he’d really like to own it too,” Wolff added.

“Now, everybody around him continues to tell him that buying the Times is pretty much impossible. There will be regulatory problems. The Sulzberger family would never … And then there’s the opprobrium of public opinion.

“But it’s obviously irresistible to him. I’ve watched him go through the numbers, plot out a merger with the Journal’s backroom operations, and fantasise about the staff’s quitting en masse as soon as he entered the sacred temple.”

This increasing desire to move for titles away from his traditional right-of-centre political power base is mirrored by a cooling toward Fox News Channel, according to Wolff.

“It’s life with Wendi versus life with Fox. (And, too, it’s the Wall Street Journal – and maybe the New York Times – versus Fox),” he wrote in Vanity Fair.

“Fox has been his alter ego. For a long time he was in love with the Fox chief, Roger Ailes, because he was even more Murdoch than Murdoch. And yet now the embarrassment can’t be missed – he mumbles even more than usual when called on to justify it; he barely pretends to hide the way he feels about [Fox presenter] Bill O’Reilly.

“And while it is not possible that he would give Fox up – because the money is the money; success trumps all – in the larger sense of who he is, he seems to want to hedge his bets.”