"I am very sorry that Andy Coulson has decided to resign as my director of communications," Cameron said in a statement. "Andy has told me that the focus on him was impeding his ability to do his job and was starting to prove a distraction for the government."
Coulson is a trusted aide and his departure is a blow to Cameron, whose office had long insisted he would stay on despite the scandal.
Earlier this week, Cameron told BBC radio that Coulson deserved a second chance even though "bad things" happened when he was editor of the News of the World.
A reporter and a private investigator employed by the paper were caught illegally eavesdropping on the phones of the British royal family's entourage.
The pair were convicted in 2007, but News of The World executives have long insisted that the two were the only ones responsible for the tapping operation -- a claim whose credibility has increasingly been called into question.
The News of The World declined to comment on the resignation.