Bukola Saraki had been on trial for three years on charges of false declaration of assets during his time as the governor of Kwara state between 2003 and 2011.
An ethics tribunal last June declared he had no case to answer but Nigeria’s main anti-corruption agency, the Economic and Financial Crimes Commission, challenged the ruling.
The court of appeal then ordered Saraki to be tried again on three of 18 charges.
Judge Centus Nweze called the case a “caricature of justice” and said the prosecution had failed to establish a case against Saraki while the supposed evidence against him was “hearsay”.
The influential Saraki, who heads the upper chamber of parliament, is Nigeria’s third most-powerful politician behind President Muhammadu Buhari and Vice President Yemi Osinbajo.
He defected to the All Progressives Congress (APC) before the last election in 2015 that brought Buhari to power on a platform to tackle corruption and impunity at the highest level.
But he clashed early on with party leaders, who did not want him to be Senate president.
His tenure has been marked by increasingly strained ties between the legislature and executive.
Members of both chambers of parliament recently accused Buhari of using security agencies for the “systematic harassment and humiliation… of perceived political opponents”.
Signatories to the open letter included main opposition Peoples Democratic Party (PDP) members under investigation for corruption.
They also said former military ruler Buhari was “selective” in his fight against corruption and called for members of his own administration with cases against them to be prosecuted.
Saraki, who is tipped in some quarters to one day challenge for the presidency, used similar wording in a statement after Friday’s Supreme Court ruling.
“This is a politically motivated case. The case was trumped-up in the first instance because of my emergence as the president of the Senate against the wishes of certain forces,” he said.
“It is plain to see that the anti-corruption fight is being prosecuted with vindictiveness, to target perceived political opponents.”
He added: “I believe in the need to fight corruption but I will never be party to the selective application of the law or the rhetoric of an insincere anti-corruption fight.”
Buhari, 75, is seeking a second, four-year term at elections in February next year but is under pressure because of rising violence across the country.
On Wednesday, disgruntled APC members announced the formation of a new grouping in the party which is widely seen as a prelude to defections that could further weaken his position.
Saraki and the speaker of the lower House of Representatives, Yakubu Dogara, are expected to join them.