The Federal High Court in Abudja ruled that the leadership of the ADC, one of the three major parties contesting the January presidential election, was illegally constituted and therefore voided Abubakar's candidacy.
The party, which accused the ruling All Progressives Congress (APC) of involvement in the lawsuit, says it will appeal.
Thursday's decision is "another desperate attempt to cripple the opposition and deny Nigerians the right to choose their leaders in the forthcoming general elections", ADC spokesman Bolaji Abdullahi said in a statement following the ruling.
Nigerians are set to choose a successor to President Bola Tinubu on 16 January.
Tinubu's main challengers are again expected to be Abubakar and Peter Obi, a former governor of Anambra State.
Nigeria's Tinubu defends record as economy bites ahead of election
Leadership row
The ADC, one of the main opposition parties trying to oust Tinubu, has been mired in lawsuits around its leadership.
Earlier this year, the federal government backed a separate lawsuit over the ADC's eligibility to contest the 2027 vote.
The lawsuit claimed the party had failed to meet constitutional requirements, but an appeals court overturned the ruling.
The party and government critics say the case against ADC has been orchestrated by the ruling party.
Tinubu spokesman Daniel Bwala said the APC "is not involved at all" in the suit over the party's leadership that sparked Thursday's decision.
Nigeria election campaign begins as voters grapple with inflation crisis
'Shocking' decision
The court ruling was handed down a day after Abubakar launched his campaign with a rally in Sokoto state.
"The timing of this judgment is no coincidence," he said in a statement.
Nigeria is set to go to the polls on 16 January against the backdrop of a troubled economy and escalating insecurity.
Incumbent Tinubu faces a splintered opposition, mainly from Abubakar and Peter Obi, setting up a rematch of the 2023 presidential election.
Abubakar and Obi came second and third in 2023, respectively.
The campaign has got off to a slow start since August, as opposition parties remain mired in legal battles, boosting Tinubu's chances at the polls.
Nigeria's security 'has never been worse' as coup trial opens
If Abubakar cannot run, it would leave the election without any major candidate from the north – a potentially disruptive development in a country where regional representation is a politically sensitive issue.
Obi called Thursday's ruling against Abubakar "shocking".
(with newswires)



Barred Nigerian presidential hopeful vows to stay in race
Israel's Eisenkot claims 'progress' in coalition talks as opposition eases on ul...
Soldiers allegedly shoot sand and stone tipper truck drivers in Afienya
Minority demands answers over nationwide shutdown of health information systems
Wontumi’s bail application delayed as JUSAG strike disrupts court proceedings
President Mahama, Boeing agree roadmap for establishing Ghana’s national airline
Passports director interdicted over alleged $50,000 sale of service passports
"There is no substantive Chief in Gomoa Ekwamkrom" – Nana Ekwam X dismisses rumo...
Questions raised over impartiality of committee investigating passport scandal
'Don't take metaphorical NPP serious, they should be apologising to Ghanaians' –...
