David Cameron gave misleading evidence to the Leveson inquiry over his friendship with the former News International chief executive Rebekah Brooks, according to a new book by a journalist with close links to No 10.

In one of the most authoritative accounts of Downing Street's links with News International, Matthew d'Ancona also writes that the prime minister was awestruck by the former News of the World editor Andy Coulson.

D'Ancona, who has known the prime minister for 20 years, says the prime minister was wrong to tell the Leveson inquiry that he saw Brooks more frequently after her marriage to his Eton contemporary Charlie Brooks. "I was definitely seeing her more often because of my sort of friendship with Charlie and as a neighbour," Cameron told Leveson of his fellow members of the "Chipping Norton set".

The former Spectator editor dismisses this account in a new book on the coalition, In It Together. D'Ancona writes: "But this was misleading. Cameron knew Charlie Brooks only slightly before his marriage to Rebekah. It was Rebekah who brought him closer to Charlie, not the other way round."

D'Ancona writes that Brooks got close to Cameron by a mixture of charm and persuasion. He writes that Brooks was different from other journalist friends he named at Leveson, such as the Economist's Xan Smiley. "Rebekah Brooks was different. She was not a member of the Cameroon gang, the 'Notting Hill Set' or a veteran of the Tory research department. Yet her charm … had enabled her to break through Cameron's armour."

Brooks is due to stand trial next month on five charges in relation to allegations of conspiracy to hack phones, conspiracy to pervert the course of justice and conspiracy to commit misconduct in public office. She denies the charges and has pleaded not guilty.

In his account of the coalition, d'Ancona writes that Cameron did not ask Coulson about allegations of phone hacking at the News of the World while he was editor. He writes: "Cameron was notably incurious in his conversations with his former employee about what, precisely, had happened at the newspaper on his watch."

Coulson is due to stand trial next month on three charges in relation to allegations of conspiring to hack phones and allegations over a conspiracy to commit misconduct in public office during his editorship. Coulson has denied the charges and pleaded not guilty.

D'Ancona writes of how Coulson became an indispensable member of Cameron's inner circle after joining the Tory party as communications director in 2007. He writes: "Coulson shared with [George] Osborne a desire to root coalition politics in a language that could be sold on the doorstep and pave the way to an outright Conservative victory in 2015.

"Cameron, in contrast, was awestruck by his communications director, whom he privately described in lyrical language … He treated Coulson as a redtop shaman, a source of knowledge about the world of tabloids, Essex and kitchen-table politics."

Coulson resigned as the No 10 communications director in January 2011 as reports about alleged phone hacking at the News of the World intensified. He denied any knowledge of illegal phone hacking and resigned because he said a spokesman could no longer continue when he needed a spokesman himself.

The book says the agreement between Cameron, Nick Clegg and Ed Miliband over the Leveson report strained the coalition. In the early part of this year, when Clegg and Miliband were pressing the prime minister to strengthen his position, Cameron "snapped" at his deputy: "You can go off and do whatever you want with Labour!"

But Clegg had earlier told Cameron that the negotiations with Miliband showed why he did not want to enter a coalition with the Labour, despite the fact that Labour and the Lib Dems were closer on press reform. D'Ancona writes: "After one meeting of the party leaders in which the Labour leader had moralised a little too much, Clegg turned to Cameron and said: 'Now you can see why I don't want to go into coalition with him'."

The remarks by Clegg, which are relatively recent, may undermine his claim that he has no preference over a future Lib Dem coalition partner if the party holds the balance of power after the next election.

The book reveals that Cameron took his appearance before the Leveson enquiry so seriously that Lord Feldman, his old friend and tennis partner at Brasenose College Oxford, assumed the role of the counsel for the enquiry in a prep session.

Feldman himself faced pressure on Sunday over his own relations with the media when he appeared to change tack over allegations that he described Tory activists earlier this year as "swivel-eyed" loons. Feldman initially dismissed the claim that he made the remarks, reported in the Times, Daily Telegraph and Daily Mail, as "completely untrue".

But he told a Tory conference question and answer session with party members, which was inadvertently shown on the conference television channel: "For me it was particularly unpleasant because I felt that everything I had done since 2008 was aimed in that direction [improving relations with the voluntary party] and was distorted by these journalists. So, these things happen.

"I'm not a professional politician. I don't interact with journalists every day. They have chosen to − really a crass distortion of a conversation. And, as I say, it's not what I think and it's not what I said."

A No 10 source said of the claims about Cameron in the d'Ancona book: "The idea that the prime minister has misled Leveson is complete nonsense. The other claims are assertions that have no basis in reality."