In his last address to parliament, he said he would advice his successor that British trade, cooperation and security would be best served by a close relationship with Europe.
Cameron, who was given a standing ovation in the House of Commons, defended his achievements in office, saying there had been many "amazing moments" during his six years in power.
Cameron, who had campaigned for Britain to remain a part of the economic bloc, had announced he will be stepping down for a new PM to handle the Brexit negotiations.
He admitted he will miss "theroar of the crowd" and the "barbs from theOpposition" as he moves on from office.
More From This Section
"But I will be willing all ofyou on," he said to fellow MPs in his parting words.
"You can achieve a lot of things in politics...And that in the end, the public service, the national interest, that is what it's all about. Nothing is really impossible if you put your mind to it. After all, as I once said: 'I was the future once'," said Cameron, who has said he intends to carry on as a backbench Conservative party MP for Witney in Oxfordshire.
"I came into Downing Street to confront our problems as a country and lead people through difficult decisions so that together we could reach better times. As I leave today, I hope that people will see a stronger country, a thriving economy, and more chances to get on in life," he told The Daily Telegraph in one of his farewell interviews.
The Camerons will now move into a temporary rental accommodation in central London as their own home in Notting Hill area of the city is still occupied by tenants.