He said he looked forward to continuing as a member of the Labour Party and as the MP for Mt Albert.
"Whoever becomes the new leader can rely on my full support,'' he said.
There was no explanation at Mr Shearer's hastily called press conference about why he stood down and no word on who may take over.
Labour Whip Chris Hipkins, who was at Mr Shearer's side at the press conference, tweeted shortly afterwards: "It has been an absolute privilege to work with and get to know David Shearer. He is a man of great integrity, honesty and compassion.''
"I respect David's decision to stand down. David has put our collective ambitions for NZ ahead of his own. He has humility and dignity.''
'HE DID HIS BEST'
New Zealand First Leader Winston Peters said Shearer was a "really decent guy and it was always going to be tough to be the leader during the recovery period for any political party''.
"I think that it's time for some people to reflect on where they want to go because a few months from now the political scene will change and I think will change dramatically and those parties that are in opposition need to be aware of that.''
Asked whether Mr Shearer was up to the job, Mr Peters said his Labour colleagues had said no: "That's your answer.''
Mr Peters wouldn't volunteer a view on who should be the new Labour leader.
Maori Party co-leader Te Ururoa Flavell said he was shocked by Mr Shearer's decision but added that it was probably inevitable.
"Today's not necessarily about making a statement about him or what he has or hasn't done, I just feel sorry for the guy.
"Bearing in mind that most people that come in here come with the very best intentions and he obviously came back in the belief he could give something to the Labour Party and to Parliament.
"He did his best, and that's all you can ever ask for a person in here.''
Act Leader John Banks said Mr Shearer was "knocked down'' by Prime Minister John Key in Parliament on Tuesday when the Labour leader produced two dead snapper in the House to use as props in his attack on proposed cuts to recreational fishing quota.
"Floored, king hit, knocked down and he was never going to get up.''
Mr Banks said Mr Shearer's leadership of Labour was "useless, the worst leadership of the Labour Party since Bill Rowling and I was here in Parliament with Bill Rowling''.
However, politics aside, Mr Banks said Mr Shearer was ''a very good man''.
"He's got two Russian adopted children he's a very good man.''
Green Party Co-Leader Metiria Turei said she and Russel Norman had enjoyed working with Mr Shearer, "but it is up to the Labour Party to decide who their leader is".
She said she was surprised Mr Shearer had stepped down at this point, "and I think it's very brave that David has resigned rather than be removed but the reasons for all of those decisions are his and Labour's.
" don't know any details of why this has happened now.
"We will work closely with whoever is the next leader of Labour."
She had no view on who that should be.
"I think he did a good job over the last few years."
National's Steven Joyce said Mr Shearer was "a really decent human being, but obviously they've got some internal issues there they need to resolve".
"We always thought he was the best Labour Party Leader they could have had so presumably they'll have to go a lot further down the list."
The Mana Party's Hone Harawira said he always found Mr Shearer to be "very very friendly and very open".
"I think that was probably his downfall - nice guys don't last long in this game."
A LIFE IN LABOUR
David Shearer won the Labour leadership after just 30 months in Parliament and held the position for less than two years. Mr Shearer entered parliament in 2009 after two failed attempts standing on a Labour ticket.
He first stood as a list candidate in 1999, after which he worked in the Beehive for two years as an advisor to then Foreign Minister Phil Goff.
He contested but failed to win Labour's nomination for Waitakere in 2002, instead standing for the party in Whangerei.
After failing to win that seat, he returned to humanitarian work, which saw him based in some of the world's worst troublespots.
He had and wife Anuschka Meyer have an extensive background of aid work in the 1980s and 1990s, including running camps in Somalia during the civil war in 1992.
Mr Shearer was working for the United Nations Development Programme in Baghdad when Helen Clark resigned from her Mt Albert seat to take up a role with the same UN organisation.
He returned to New Zealand, winning Mt Albert in a byelection in June 2009.
He successfully retained the seat with a 10,000 majority in the 2011 election and successfully contested the Labour leadership after Phil Goff resigned as leader in November 2011.
David Shearer's full statement:
"I have been privileged to lead the Labour team for the past 20 months and I'm proud of the gains we have made in that time.
"But we need to do more. So the time has come for me to hand over to a new leader who can take Labour through to 2014.
"There was no letter there was no ultimatum, there was no vote. But from the soundings I have taken from colleagues I realise I no longer enjoy the confidence of a number of my caucus colleagues.
"It has been a challenging time off the back of the 2011 election result. We have rebuilt and reformed the Party and under my leadership, we have released a number of significant policies to improve peoples' lives.
"KiwiBuild - which will put 100,000 families into their first, affordable home. NZ Power - which will bring down power bills for every Kiwi family and business. And there is much more to come.
"After spending the last 20 years of my life leading humanitarian and reconstruction projects overseas, I came home to New Zealand because I'm passionate about this country.
"We have a history to be proud of but I believe our best years lie in front of us. But to really take this country forward, we need a change of Government. We need a progressive Government with fresh ideas.
"We need a Labour-led Government.
"The ambitions of one person should never be larger than that greater purpose. It is time for someone else to take up the challenge of leader.
"I came into politics to make a difference. I believe I have done that. And I will continue to do so as a loyal member of the Labour team and the MP for Mt Albert.
"I would like to thank my fellow MPs and my staff for all their hard work. I wish them all the best for the future."