He warned the UK faced a "very dangerous moment" in its relationship with Europe and Mr Cameron, who has previously faced pressure from his own MPs to back an in/out referendum after the next election, was not working in the national interest.
"I will not allow our country to sleepwalk toward exit because it would be a betrayal of our national interest."
Mr Miliband stressed the importance of being part of the single market for British businesses, which do 60% of their trade with EU members.
"If we left the EU it would be the United States, China, the European Union in the negotiating room - and Britain in the overflow room.
"We would end up competing on low-wages and low-skills: an off-shore low-value economy, a race to the bottom," he said.