Mr Shearer first stood as a list candidate for Labour in 1999 but the list ranking committee placed him near the bottom.
That was unsurprising. He had just returned to New Zealand from Britain where he had been a researcher at the International Institute of Strategic Studies, which specialises in global security.
Labour won the election in 1999 but Mr Shearer didn't stand a chance, ranked at number 63 out of 65.
Instead, he went to work as an adviser to Foreign Minister Phil Goff who became a political patron to Mr Shearer.
Mr Goff first met Mr Shearer in the late 1990s when the latter walked into his electorate office to discuss politics.
The pair attended Papatoetoe High School together but Mr Goff's last year there was 1970 and Mr Shearer's first year was 1971 so their paths didn't cross.
Mr Shearer took up leadership roles at the school, becoming head boy and captain of the First XI.
After working for Mr Goff at Parliament, in 2002 Mr Shearer tried to win Labour's nomination for Waitakere.
But the Engineering Printing and Manufacturing Union organised strongly in favour of Lynne Pillay. She won the nomination and held the seat for two terms.
After being rejected in Waitakere, Mr Shearer sought and won Labour's nomination for Whangarei for the same 2002 election.
Labour polled higher than National in the party vote but Mr Shearer lost to National's sitting MP, Phil Heatley.
Mr Shearer then returned to humanitarian work in global trouble spots of the sort he had done in the late 80s and early 90s, for which he was named New Zealander of the Year by the Herald in January 1993.
When Mr Goff rang to tell him former Prime Minister Helen Clark would resign from Parliament to take up a post at the United Nations Development Programme, Mr Shearer was working in Iraq as the UNDP's No 1 man in Baghdad.
He returned home to win the former leader's seat and brought his family - wife Anuschka Meyer, 14-year-old son Vetya and 12-year-old daughter Anastasia - home from Jordan.
Mr Shearer was the Labour Party spokesman for research, science and technology and also for tertiary education.