Mr Sarwar’s appointment comes after the shock resignation of Richard Leonard in January, who said it was in the best interests of the party for him to stand down.
Mr Leonard had been leader of the party for three years after succeeding Kezia Dugdale.
In a speech to members after the announcement, Mr Sarwar thanked Ms Lennon for a campaign that “has shown the best of our party, not the worst of our politics”.
Speaking directly to voters, he said: “I know Labour has a lot of work to do to win back your trust, because if we’re brutally honest, you haven’t had the Scottish Labour Party you deserve.
“Rising injustice, inequality and division, I’m sorry we haven’t been good enough and I will work day and night to change that so we can build a country we all need.”
Mr Sarwar is the first ethnic minority leader of a political party in the UK – which he said “says something great about Scotland and its people”.
“But the fight for equality is far from over,” he added, “and I’ll work with all our diverse communities in Scotland to rebuild the country we love”.
UK Labour leader Keir Starmer also congratulated Mr Sawar. He tweeted: “Huge congratulations to Anas on his election as Leader of the Scottish Labour Party. I look forward to working with him to secure our economy, protect our NHS and rebuild our country.”
“I know Anas will do the hard work that is necessary to win back the trust of the Scottish people and build for the future as we emerge from this pandemic“.
Mr Sarwar will take charge of the party ahead of the Scottish Parliament election, which is scheduled to be held on May 6.