Jean-Claude Juncker said he “should not have listened” to the former prime minister and “spoken out” on the issue.
It comes as the row over political lobbying, sparked by Mr Cameron‘s use of Government contacts to lobby on behalf of Greensill Capital, deepened - prompting a series of probes into the matter.
Speaking to the i newspaper, Mr Juncker said that Mr Cameron told him not to conduct interviews with the British press.
“I should not have listened to David Cameron,” he said.
“He told me not to interfere in the debate in the UK, not to come to London, not to do interviews with the British press.
The UK left the European Union on January 31 2020, seven years after the referendum ordered by Mr Cameron in 2013.
The decision to leave - by 52% to 48% - left the EU in shock, and Mr Cameron resigned as prime minister shortly afterwards.
A deal was finally brokered between Prime Minister Boris Johnson and Mr Juncker’s successor Ursula von der Leyen, after spates of sometimes hostile negotiations that were hindered by the coronavirus crisis.
“I made a mistake because I did not defend the EU’s point of view in the UK,” said Mr Juncker.
“They asked me to shut up, so I shut up. That is something I criticise myself for. I should have spoken out rather than stay silent.”
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies