The vote cleared any person convicted but then either pardoned or amnestied to run for office, clearing the way for Khalifa Sall and Karim Wade, who would otherwise have been ineligible. The proposal was passed by 124 votes to one.
Once the text is officially promulgated, which seems likely given it was backed by the government, both men will be free to run for office.
Sall, a former mayor of Dakar, and Wade, son of former president Abdoulaye Wade, have both been considered leading contenders for the presidential vote, due in February 2024.
They were prevented from running in the last presidential election, in 2019, because of separate convictions for financial crimes.
The 2019 victor Macky Sall, who is completing his second term in office, is ineligible to run.
Some observers believe that Saturday's parliamentary vote may help ease the tension that has gripped the country in recent months, as opposition figures complain of moves against them ahead of next year's vote.
Senegal until recently enjoyed a reputation of relative stability in the region.
But since 2021 it has been shaken by sometimes the deadly political violence between supporters of the government and those of the leading opposition figure Ousmane Sonko.
For months, there was speculation that President Sall might run for re-election despite having already served two terms, until he finally confirmed in early July that he would not be standing again.
But the way in which leading opposition figures such as Wade and Sall had been ruled out of the electoral race because of their convictions also sparked political tension.
On Monday Sonko, widely considered another leading contender for next year's presidential poll, was indicted and detained and his party dissolved.
A government spokesman accused him and his followers of having fomented insurrection and promoted violence.
It now seems more likely than ever that Sonko, who has already been convicted in two other cases, will be unable to contest the election.
In this context then, the presidential race seems more than usually open.
But Karim Wade, 54, a former minister during his father's presidency between 2000 and 2012, seems to be back in contention.
His six-year prison conviction in 2015 was for illegal enrichment. He served three years before being pardoned by President Sall in 2016, after which he went into exile.
Saturday's parliamentary vote means that his conviction does not count against him in political terms because of the subsequent pardon.
Khalifa Sall, 67, served as mayor of Dakar from 2009, but he was detained in 2017, accused of embezzlement and sentenced to five years in jail the following year.
He was released in 2017, also having received a presidential pardon.
All three opposition figures have denounced the judicial proceedings against them as politically motivated.
President Sall meanwhile, opened talks with a part of the opposition in May, agreeing to discuss the eligibility of Khalifa Sall and Wade for political office.
Those involved in the talks agreed on this latest change to the law as the solution.
In 2021, Khalifa Sall and Sonko agreed an electoral alliance. Their coalition, Yewwi Askan Wi, won control of several cities, including Dakar in the 2022 local elections.
In the same year, it became the main opposition force in parliament.
Some observers see President Sall's decision to enter talks with supporters of Khalifa Sall and Wade as a bid to split the opposition.
Certainly, while Khalifa Sall and his supporters agreed to enter those talks, Sonko refused.
The case of Sonko haunted Saturday's parliamentary debate, with the presidential camp quitting the chamber when one deputy called for Sonko to benefit from the new measure.
Bakary Diedhiou denounced the proposed law as "cynical," as it was designed to eliminate a candidate who represented great hope for many people.
The presidential camp has left Macky Sall free to nominate a candidate for his own succession, and that decision is expected next week.