He added: "Whatever the ups and downs have been in the past, everybody has got to come together and make sure that as a nation we come through this successfully."
The prime minister also set out plans for a National Economic Council which will co-ordinate economic policies across the government and will meet for the first time next week.
In other moves Labour veteran Margaret Beckett gets housing and Ed Miliband heads up a new climate and energy department.
Geoff Hoon replaces Ruth Kelly, whose resignation as transport secretary triggered the reshuffle.
Immigration minister Liam Byrne has been promoted to the new role of policy coordinator, not a full cabinet role but he will attend cabinet meetings. Mrs Beckett will replace Caroline Flint as housing minister. Ms Flint will go to the Foreign Office as Europe minister.
Defence Secretary Mr Browne is to leave the government after turning down two job offers from Mr Brown.
Former agriculture minister, and close Gordon Brown ally, Nick Brown returns as chief whip, to replace Mr Hoon. Leader of the House of Lords, Baroness Ashton, will replace Mr Mandelson in Brussels.
Northern Ireland Secretary Shaun Woodward and Environment Secretary Hilary Benn remain in their current posts - as do those in the top jobs, chancellor, home secretary and foreign secretary.
This is an extraordinary step backwards into the worst elements of the Blair era, to reinstate possibly the most divisive figure in Labour's recent history
Paul Myners, the chairman of the Guardian Media Group and former chairman of Marks & Spencer, has been made City minister.
Lord Drayson - the controversial tycoon who quit government to race sports cars in America - has also returned as a minister at the department of skills.
But the announcement that Mr Mandelson was to return to the cabinet came as the biggest surprise.
The former Northern Ireland and trade and industry secretary said he was not expecting to be asked but was looking forward to the challenge.
Reporters suggested his feud with Mr Brown had been one of the frostiest periods in modern politics, he replied: "Well I think you're exaggerating to make a point.
"But of course we've had our ups and downs but we have also known each other for over 20 years and originally we worked very well together and I am very proud to have been invited to serve in his government."
He said Mr Brown was doing "an exceptionally good job in what are very, very challenging conditions for our country".
Mr Mandelson has been a controversial figure, resigning twice from cabinet posts - once over a loan from his ministerial colleague Geoffrey Robinson and once over allegations of misconduct over a passport application for the Hinduja brothers. He was later cleared of any wrongdoing.
Gordon Brown explains why he brought Peter Mandelson back
Former home secretary David Blunkett described his appointment as a "masterstroke" and told the BBC it would unite the government.
"It is embracing someone who, in the past, had been seen as being very close to Tony Blair, so it's an inclusive measure," he said.
But left wing Labour MP John McDonnell said he was "absolutely gobsmacked": "This is an extraordinary step backwards into the worst elements of the Blair era, to reinstate possibly the most divisive figure in Labour's recent history."
For the Conservatives, William Hague said it was a "stunning failure of judgement" by Mr Brown: "In bringing back Peter Mandelson - the man who created Labour spin - he has broken his promise to govern in an honest and open way."
For the Liberal Democrats, Danny Alexander said: "Resurrecting ex-ministers from the political graveyard is not going to breathe new life into Gordon Brown's zombie government."
In a separate development, Sir John Bond, the chairman of Vodafone, is to become a "business ambassador" for the government.
There has also been a shake-up among key staff at Downing Street, following reports of in-fighting.
Mr Brown's press secretary and special adviser for media affairs, Damian McBride, is to to take a "more back room role" and will no longer speak to the media on the government's behalf. Government officials stress it was his decision.
Mr Brown's strategy chief, former advertising chief Stephen Carter, will move from Downing Street to become a junior minister for communications, technology and broadcasting.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.