The central Scotland MSP stood down just days before he faced another difficult meeting of the party’s Scottish Executive committee this weekend and admitted question marks over his leadership had become too much of a “distraction.”
A procedures committee has now been formed by the party to oversee the election of a new leader north of the border.
Leonard had faced calls from some of his own MSPs to quit last year but pledged to stay on until the election.
But he said he had thought “long and hard” over Christmas about the Coronavirus pandemic and Scottish Labour’s approach to tackling it.
"I have also considered what the speculation about my leadership does to our ability to get Labour’s message across,” he added in a statement.
"This has become a distraction.
“I have come to the conclusion it is in the best interests of the party that I step aside as leader of Scottish Labour with immediate effect.
“This was not an easy decision, but after three years I feel it is the right one for me and for the Party.”
Labour Scottish Executive committee chair Cara Hilton said the Procedures Committee to oversee the election of a new leader will meet tomorrow.
She added: "The Scottish Executive Committee will meet in the coming days to agree a timetable for electing Richard’s successor.”
Mr Leonard replaced Kezia Dugdale as Labour leader in November 2017 but has struggled to make any inroads on the massive lead enjoyed by the SNP in the polls - or even to regain second spot from the Tories.
The party was again reduced to one MP north of the border at the general election just over a year and the party finished a disastrous fifth place in the European elections earlier in 2019.
The former trade union worker today thanked those who "worked with me in good times and bad.”
"This experience and the great people I have met will live with me forever," he added.
"I owe a huge debt in particular to all those party members who work tirelessly for the cause of Labour.
I retain my faith in the Labour Party as the party that offers hope to people and that remains the only vehicle for the realisation of that hope.
"Whilst I step down from the leadership today, the work goes on, and I will play my constructive part as an MSP in winning support for Labour’s vision of a better future in a democratic economy and a socialist society."
Leonard came under intense pressure to stand down as party leader last September when his then Justice spokesman James Kelly quit the shadow cabinet over the party’s “unacceptably low” ranking of just 14 per cent in the opinion polls at the time.
Mr Kelly was followed fellow Labour MSPs Mark Griffin, Daniel Johnson and Jenny Marra who backed his demand for a change in leadership.
But Mr Leonard appeared to have weathered the storm and looked set to lead the party into May's election before today's shock announcement.
His departure met with tributes from across the political spectrum at the Scottish parliament.
First Minister Nicola Sturgeon was among those to wish him well.
"Despite our political differences, I’ve always liked Richard Leonard," the First Minister tweeted.
"He is a decent guy and I wish him well for the future."
The Tories Holyrood leader Ruth Davidson also hailed his personal qualities.
"When I stepped down in August 2019, I discovered that political resignations are odd things, like reading obituaries when you are still alive," Ms Davidson said
"Whatever else is written about Richard, I have to say I always found him a thoroughly decent man and a committed campaigner."
Liberal Democrat leader Willie rennie added: "Richard Leonard is a good man who cares deeply about his politics and his party.
"There is no better evidence of that than his decision to step down from the top job."
Greens co-leader Patrick Harvie seized the opportunity to make a pitch for disgruntled Labour voters in the aftermath of Leonard's departure.
“I wish Richard Leonard all the best for the future," the Glasgow MSP said.
“Scottish Labour could now field an entire football team of former leaders and acting leaders. The party has spent almost the entire devolution era fighting among itself, all the while letting down Scotland’s working class communities.
“Many Labour members have understandably become utterly disillusioned with their party’s constant infighting.”
Mr Leonard is expected to contest the forthcoming election in Central Scotland list where he is top of the regional list for Labour and stands a good chance of being returned.
The immediate impact of Mr Leonard's departure is that the current Scottish deputy leader Jackie Baillie will take over the leadership duties on an interim basis at Holyrood while replacement is sought.
She is unlikely to be among the candidates to replace him in the longer term but could conceivably lead the party into the forthcoming Holyrood election on an interim basis if Labour opts against a leadership contest in the weeks building up tpo a Scottish Parliament election campaign.
The news met with a withering response from left-wing labour MSP Neil Findlay who has been an outspoken critic of the moves to oust Mr Leonard from the party's leadership.
Mr Findlay tweeted: "Looks like those who have led a 3 year campaign of briefings to journalists, leaks of private conversations and the constant feeding of stories to the media to bring down a decent and honest man have succeeded. "These flinching cowards and sneering traitors make me sick."