Appearing at the Leveson Inquiry into media ethics, the prime minister said that he was not even aware of News Corp's imminent £8bn bid for the pay-TV giant before it was announced in June 2010, the month after he entered Downing Street.
Cameron also accused former prime minister Gordon Brown of "cooking up" a "specious and unjustified conspiracy theory" about a deal with the Murdoch empire.
Brown had said earlier in the week at the Leveson that the Tories agreed to cut funding for the media and scrap media regulator Ofcom in exchange for support from Murdoch's News International stable of newspapers.
The prime minister, who is currently halfway through a full day of evidence at the Royal Courts of Justice inquiry, said that he had "never traded a policy" in return for media backing.
Despite being a friend of ex-News International boss Rebekah Brooks, and having hired ex-News of the World editor Andy Coulson as his communications chief, Cameron said that there had never been "no overt deals", "no covert deals" and "no nods and winks" with News Corporation.
Discussing the Sky takeover bid, he said: "On this idea of overt deals, this idea that somehow the Conservative party and News International got together and said, 'You give us your support and we'll wave through this merger' - which by the way we didn't even know about at that stage - I think the idea of overt deals is nonsense.
"I also don't believe in this theory that there was a nod and a wink and some sort of covert agreement. Of course I wanted to win over newspapers and other journalists, editors, proprietors, broadcasters; I worked very hard at that because I wanted to communicate what the Conservative party and my leadership could bring to the country. I made my arguments.
"But I didn't do it on the basis of saying either overtly or covertly, 'Your support will mean I'll give you a better time on this policy or that policy', and there are plenty of examples of policies that I believed in that the people who were backing me [in the media] didn't believe in."
Cameron said that the relationship between press and politicians had become "too close" over the last 20 years. He also said that the current system of regulation of newspapers was broken and needed to be fixed.
"I don't think the regulatory system that we have at the moment works," he said.
In his witness statement to the inquiry, Cameron revealed that he had 1,404 meetings with "media figures" while in opposition between 2005 and 2010, around 26 a month on average. That fell to 13 a month when he moved into government.
"Most of these meetings were about me trying to promote Conservative policy," he stressed.
He admitted to meeting News Corporation boss Rupert Murdoch for a dinner on the Greek Island of Santorini in 2008, saying that it was a chance to "build a relationship" with him.
But it is his relationship with Rebekah Brooks, the former editor of the News of the World and the Sun, that has caused even greater controversy.
The inquiry heard a text message sent by Brooks to Cameron in October 2009, which read: "I am so rooting for you tomorrow, not just as a personal friend, but as professionally we are in this together. Speech of his life, yes he can."
The prime minister said that it was a reflection of the fact that the Sun had switched its support from Labour to the Conservatives the previous week.
Brooks and her husband Charlie, who went to school with Cameron, yesterday appeared in court charged with conspiracy to pervert the course of justice in the police phone hacking investigation.
Cameron is now continuing his evidence at the Leveson, including expected questioning on the controversial decision to hand the Sky takeover bid decision to culture secretary Jeremy Hunt.