Sonko was greeted by hundreds of supporters outside a hotel in the capital Dakar, where he held a news conference with his deputy and presidential hopeful Bassirou Diomaye Faye, also released from prison late Thursday.
Sonko predicted a convincing first-round victory for Faye if the March 24 vote went ahead without fraud.
"If the election goes well, I don't think we'll get less than 60 percent," he said.
He called on "the Senegalese people to remain vigilant, especially as there are rumors of corruption circulating," while adding that he did not have "sufficient evidence" on the matter.
Disqualified from running in this vote, 49-year-old Sonko has been at the center of a more than two year stand-off with the state.
Sonko named Faye to replace him on the presidential ballot and in Friday's speech, he re-iterated his backing for him.
"My person is not the most important thing. My objective is to help win the election," he said.
"I did not choose Diomaye by chance," he added, referring to Faye.
'Support and solidarity'
Sonko reserved his sharpest attacks for the presidential camp's candidate, former prime minister Amadou Ba.
But he insisted "the election will not be a war."
"There will be no revenge, there will be justice," Sonko said, referring to accountability for those currently in power should his camp win.
Faye is thought to be one of the favorites to win the presidential election.
His coalition had kicked off the campaign while he was still behind bars, pitching him as the candidate for "system change" and "left-wing pan-Africanism."
The opposition figure has promised to reclaim Senegal's sovereignty and renegotiate oil and gas contracts, as well as defence agreements if elected.
In the early hours of Friday, thousands thronged the streets of Dakar, singing and dancing as Sonko and Faye were driven away from the city's Cap Manuel prison.
Upon his release, 43-year-old Faye, smiling and raising his arms to the sky after almost a year behind bars, praised the "support and solidarity" of his followers.
Faye and Sonko benefited from an amnesty law passed by MPs last week.
It had been proposed by the outgoing president with the aim of easing tensions after three years of unrest, reignited last month by his last-minute postponement of the presidential vote.
The impromptu rally after the release of Sonko and Faye was the largest for any of the 19 candidates since campaigning began on March 9.
It was an indication of the popularity of both men, particularly Sonko, who is not even in the race for the top job. Their release is now likely to galvanise the election campaign.
'System change'
Faye had been imprisoned since April 2023 charged with contempt of court, defamation and acts likely to compromise public peace after posting a message critical of the justice system.
His manifesto reflects the themes which have made Sonko popular, including attacks on corruption, elites, multinationals and former colonial ruler France.
The legal case against Sonko, along with economic and social tensions and concerns about whether Sall would run for a third presidential term, led to deadly unrest between 2021 and 2023.
Sonko was jailed at the end of July on a string of charges, including provoking insurrection, conspiracy with terrorist groups and endangering state security.
His political party was also dissolved.
Earlier Friday, Senegal's Supreme Court confirmed the date of the delayed presidential election, rejecting an attempt by disqualified candidates to cancel the date.
The petitioners had wanted presidential decrees setting the date for the election and the duration of the campaign to be suspended.
But the court said the issue did not fall within its purview, adding that the Constitutional Council had "full jurisdiction in electoral matters."
President Macky Sall had postponed the February election, trying to push it back to December at the last minute, sparking a crisis and deadly protests.
The Constitutional Council stepped in, forcing him to reset the date to March 24.