In eagerly awaited testimony to the Leveson Inquiry, Cameron admitted however that British politicians had become too close to newspapers and said the relationship needed to be better regulated.
Cameron was expected to face questioning over his links to Murdoch and two of the media baron's top lieutenants, who have been arrested over the phone-hacking scandal at Murdoch's now-defunct News of the World tabloid.
"The idea of overt deals is nonsense," Cameron said, responding to suggestions that his Conservative party treated Murdoch's News Corp. empire softly in exchange for positive coverage.
"I also don't believe in this theory that there was also a nod and a wink and a covert agreement," he added.
Cameron set up the Leveson inquiry in July last year after the News of the World was shut down in the wake of a public outcry when it emerged the tabloid had hacked into the phone of a murdered schoolgirl.
As the scandal spiralled, the Conservative-led government's own links to the Murdoch empire came under scrutiny, particularly as it was responsible for deciding on a News Corp takeover bid for pay-TV giant BSkyB.
Cameron said that British politicians generally had become too close to newspapers, without mentioning Murdoch, who still owns The Sun, Britain's best-selling tabloid, The Times and Sunday Times in Britain.
"It has been too close and I think we need to try and get it on a better footing," Cameron told the inquiry, led by senior judge Brian Leveson.
There should be "greater transparency, better regulation, having a little more distance" in the future, the prime minister added.
Cameron was driven from Downing Street to the Royal Courts of Justice in London to attend the inquiry. Wearing a white shirt with a dark suit and blue tie, he gave a brief wave to waiting photographers as he walked inside.
Questions are likely to focus on his relationships with former Murdoch high-fliers Rebekah Brooks and Andy Coulson.
Brooks, a friend of the Camerons, former editor of the News of the World and chief executive of Murdoch's British newspaper wing News International, has been arrested over the phone-hacking scandal.
The former Murdoch top aide has been charged with conspiracy to obstruct justice, and will appear in court to answer the accusations on June 22 after being granted bail by a London court on Wednesday.
The prime minister may also be asked about his former media chief Andy Coulson, another ex-editor of the News of the World, who has been charged with perjury in a case relating to a story in the paper.
Coulson was separately arrested last year on suspicion of phone hacking and corruption.
Scotland Yard said it had arrested three more people on Thursday in a bribery probe linked to the hacking investigation, including a former prison officer.
Around 50 people have been arrested so far in the combined investigations into bribery and hacking.
Cameron's immediate predecessors Gordon Brown, Tony Blair and John Major have already given evidence to the Leveson Inquiry, which is examining the culture, practices and ethics of the press.
The inquiry is due to produce a report, likely to include recommendations on the future of press regulation, in October.
Cameron's appearance comes amid new reverberations from the scandal, with a rift opening in the coalition government over a parliamentary vote on Wednesday over whether to investigate the culture minister's links to News Corp.
The premier has refused to open a probe into whether Jeremy Hunt broke ministerial rules when he was responsible for deciding whether the BSkyB deal would go ahead.
In a separate development, prosecutors said they would not bring charges against a Guardian journalist after he admitted hacking an arms company executive's phone.
The Guardian is the paper that led efforts to investigate hacking.