Ruling on a no-case submission filed by the defendants, Gideon Kurada, the presiding judge, held that the Kaduna state government failed to establish a prima facie case against the defendants.
El-Zakzaky and his wife were arraigned on an eight-count charge bordering on alleged culpable homicide, unlawful assembly, disruption of public peace, among others.
The defendants had pleaded not guilty to the charges preferred against them.
The duo had been in detention since December 2015 following clashes between IMN members and soldiers in Zaria, Kaduna state.
The prosecution had closed its case after calling 15 witnesses.
Femi Falana, lead counsel to the defendants, had on July 1, argued that all the 15 witnesses presented by the prosecution failed to establish any connection between the alleged crimes and his clients.
He prayed the court to rule in favour of his clients and dismiss the charges leveled against them.
At the court session on Wednesday, amid tight security, the court agreed with the defendants and ruled in favour of their no-case submission.