Ed Balls, widely tipped for the Treasury brief, will be shadow home secretary, while Yvette Cooper is shadow foreign secretary.
On the crucial issue of the deficit, Mr Johnson said the government was cutting spending too far and too fast.
But he acknowledged his lack of economic experience, saying he was being "chucked in the deep end".
Asked by the BBC what his first move would be in the job, he joked that it would be to "pick up a primer in economics for beginners".
He said he would draw on the experience of other colleagues who had served in the Treasury and it was a "glorious thing" about British politics that politicians had to learn quickly on the job.
Government plans to cut spending by 25% in many departments risked "creating mayhem", he stressed.
"These are cuts of a scale which we have never seen before," he said. "I believe the government is cutting too fast and too deeply."
"There is an alternative," he added. "The government is saying there is no alternative. They are saying it is unavoidable. It is avoidable."
During the election, former Labour chancellor Alistair Darling called for the deficit to be cut in half over four years but Ed Balls has since said this is too aggressive and needs to be done more slowly.
Asked which camp he was in, Mr Johnson told Sky News that Mr Darling's policy remained the "starting point" for his thinking but Labour had lost the election and needed to "reassess" its position on all key issues.
"I never agreed that Alistair's proposals were over too short a period," he said.
"I think he got it just about right. But nothing is preserved in aspic. There have been developments since the election and we need to take all those into account."
BBC Political Editor Nick Robinson said Ed Miliband's decision to appoint Mr Johnson as shadow chancellor was a "sign of his relative weakness in the party".
Mr Johnson is a "loyalist by instinct", who is not likely to come up with an alternative economic policy, but he will be able to unite the party after a divisive leadership contest and "deploy his wry humour and connection with the real world to portray George Osborne as an out-of-touch rich kid," added Robinson.
Your views on shadow cabinetFull shadow cabinet listChallenges facing Alan Johnson
The ex home secretary is a former postman and trade union leader, who held a string of top jobs when Labour was in government, and was a vocal supporter of David Miliband during Labour's leadership contest.
But Transport Secretary Philip Hammond said his economic record and views were "a bit of an unknown" and he seemed like a "caretaker appointment".
"It's a very surprising appointment. Ed Miliband said he wanted to move on to a new generation of Labour politicians but Alan Johnson is frankly from the last generation," he told the BBC News Channel.
He said Mr Johnson would now have to say whether he would deliver on Ed Milband's promise of a shadow spending review and where he stood on his predecessor Alistair Darling's pledge to halve the deficit in four years.
Liberal Democrat MP Tim Farron raised concerns over Yvette Cooper's appointment as shadow foreign secretary, saying she had to explain her "enthusiastic support" for the Iraq war.
"Her leader now claims Iraq was a mistake, does Yvette Cooper feel the same way?" he said.
"Ed Miliband claimed to represent a 'new generation', but his shadow cabinet looks very much like the New Labour establishment that came before it."
Questioned about her stance on the Iraq war, Ms Cooper said: "There were no weapons of mass destruction, so of course that means we were wrong about that. We have to recognise that and move on from that."
She said being offered the role of shadow foreign secretary was "a great honour".
Her husband Ed Balls, who like her had been tipped for the shadow chancellor role, said he had been "surprised" by being handed the home affairs brief instead.
He said economic policy was "important" to him but he was "pleased" to be shadow home secretary and it was "not about who's doing the job, it's about winning the argument".
"It's a hugely important job and I am looking forward to doing it," he told the BBC News channel.
In other shadow cabinet appointments, Andy Burnham was named shadow education secretary while John Healey, who did well in the poll of MPs, gets health.
Harriet Harman remains Labour's deputy leader but adds the role of shadow international development secretary to her portfolio.
Sadiq Khan, who was Mr Miliband's campaign manager in the leadership election, is rewarded with the post of shadow Lord Chancellor and justice secretary.
He will also be responsible for shadowing Deputy Prime Minister Nick Clegg over his constitutional and political reform programme.
Peter Hain and Shaun Woodward, who both failed to gain enough votes from MPs in shadow cabinet elections, will carry on shadowing Wales and Northern Ireland respectively, as part of a handful of posts appointed at the leader's discretion.
Douglas Alexander, who managed David Miliband's campaign, will shadow Iain Duncan Smith at work and pensions, John Denham, who was a prominent Ed Millband supporter, will shadow Vince Cable at business, innovation and skills.
Caroline Flint, who quit the frontbench in protest at Gordon Brown's leadership, makes a comeback as shadow communities and local government secretary, shadowing Eric Pickles.
Hilary Benn, who supported Ed Miliband's leadership campaign, becomes shadow Commons leader.
New shadow cabinet faces include Meg Hillier, who gets Ed Miliband's old shadow energy and climate secretary job, while Ivan Lewis gets the culture, media and sport brief.
Maria Eagle is shadow transport secretary, while her twin sister, Angela, is shadow chief secretary to the Treasury.
Tessa Jowell carries on as shadow Olympics minister.
Read Nick Robinson's thoughts
Liam Byrne, the former Treasury chief secretary who famously left a note saying "There is no money left", is shadow Cabinet Office minister.
Announcing his new team Ed Miliband, who two weeks ago beat his brother David to the Labour leadership by a narrow margin, said: "My team is united in one central mission for the future - to win back the trust of the British people and take Labour back to power.
"Together, this new generation of Labour will work together to reject the pessimism of this coalition government as we set out our vision of what Britain can achieve."
In other reaction, the SNP said there were fewer Scottish MPs on Labour's frontbench than at any time in the past two decades.
"Labour has clearly lost its Scottish heart," Angus Robertson, the party's leader at Westminster said.
Alan Johnson has been named shadow chancellor in a surprise move by new Labour leader Ed Miliband.