In a major embarrassment, the Prime Minister had to look on as Sir Mike Rake, the president of the Confederation of British Industry (CBI) accused him of causing uncertainty and "real concern" for businesses.
Sir Mike said the UK's continued membership of the EU was "crucial" to business, which would suffer badly if the country voted to leave.
The dressing down came last night as they attended CBI Scotland's annual dinner at the Hilton hotel in Glasgow. About 200 independence supporters and demonstrators gathered outside, heckling guests and shouting "Tories out".
As guest of honour, Mr Cameron was seated next to Sir Mike. But the CBI president's comments undermined the Prime Minister's message that "certainty, stability and predictability" were among the "great advantages" of being part of the UK.
In another blow to Mr Cameron's hopes of boosting the No campaign, his visit came as Eurosceptic Tory backbencher Douglas Carswell defected to the UK Independence Party (Ukip).
The move, which will mean a difficult by-election in Clacton, Essex, for the Conservatives, left the Prime Minister defending his plan to hold an in/out EU referendum in 2017 if his party wins a majority at the next General Election.
Deputy First Minister Nicola Sturgeon said the UK was being "dragged ever closer to the exit door of Europe". She claimed independence would protect Scotland's EU membership.
Addressing members of the business organisation, Sir Mike, the chairman of BT Group and deputy chairman of Barclays, spoke out against independence, describing it as "a one-way ticket to uncertainty with no return".
But training his fire on Mr Cameron's EU poll plans, he said: "We accept that calling a referendum on EU membership is a constitutional issue for government, but the ambiguity has already, and is increasingly, causing real concern for business regarding their future investment.
"Business is in no doubt we must retain and secure our country's global future. If we are isolated, we cannot be our best.
He added: "The growth and jobs we need depend on our external relationships, and it is our membership of the European single market that is crucial."
Under pressure from Eurosceptics within his own party and faced with the growing threat of Nigel Farage's anti-EU Ukip, Mr Cameron has promised to hold a referendum on Britain's continued membership in 2017 if the Conservatives win a majority in next May's Westminster election.
He aims to renegotiate the UK's relationship with the EU, but his specific objectives are unclear. However, he has indicated he will campaign for the UK to stay in the EU if a referendum is held.
The Yes campaign claims the possibility of a referendum poses "a real threat" to Scotland remaining part of the EU. The No campaign claims an independent Scotland would struggle to keep the UK's favourable membership terms, including its valuable budget rebate.
Ms Sturgeon said: "This is a humiliation for the Prime Minister. For David Cameron to be lectured by one of the UK's most senior business figures about the dangers of his in-out referendum on EU membership shows just how worried companies are about the prospect of the UK being taken out of Europe.
"For Scotland, the choice is clear: a Yes vote that will protect our place in the EU as an independent member, or a No vote that could see us dragged out of Europe against our will, shutting us off from a single market of more than 500 million people with potentially devastating consequences for jobs and investment."
In his speech, Mr Cameron urged Scots to choose "our great advantages over the great unknown" in next month's vote.
Listing "certainty" as a key reason for remaining in the UK, he added: "Stability and predictability - these are precious commodities in an unstable, competitive world and they are what investors, businesses and families tell me they want more than anything else."
During a campaign visit earlier in the day he said new powers would be devolved to Holyrood "soon" if Scots voted No to independence.
CBI Scotland, which withdrew its application to become an official referendum campaigner on the No side, scaled back the dinner to meet spending rules.
Under referendum rules, organisations that are not registered with the Electoral Commission must not spend more than £10,000 campaigning.
Mr Cameron later rejected Sir Mike's criticism in a Q&A with CBI members. He said he wanted Britain to stay in a reformed EU.
Referring to the EU referendum, he added: "I don't believe this strategy is disadvantaging the UK in terms of investment. I see no evidence of that."