Shearer, who became opposition leader in December 2011, said Labour needed someone to take charge who could prevent Key's conservative government winning a third term next year.
"The time has come for me to hand over to a new leader who can take Labour through to 2014," he told reporters.
"We need to do more and we haven't had the lift (in popularity). To really take the country forward we need a Labour government."
He was a political novice when he entered parliament in 2009 after a career delivering humanitarian aid in areas including the Balkans, Somalia and Iraq.
He promised a fresh approach to politics but failed to dent Key's popularity. An opinion poll published by Fairfax Media this week showed support for Labour at 31.6 per cent, five points down on the start of the year, with Key's National Party on 48.3 per cent.
"From the soundings I have taken from colleagues I realise I no longer enjoy the confidence of a number of my caucus colleagues," said Shearer.