“Hakainde Hichilema and his 5 co-accused have been released from prison with the treason charge dropped,” the United Party for National Development (UPND) said on its Twitter account.
Hichilema has been in custody since April over an incident in which he allegedly failed to give way to President Edgar Lungu’s motorcade.
Lungu, who narrowly beat Hichilema in last year’s presidential election, has dismissed allegations of growing authoritarianism and has accused his rival of trying to overturn the election result.
Hichilema and five aides denied the treason charges at a plea hearing on Monday where police officers in riot gear had sealed off the court precinct as scores of UPND supporters waited outside.
The trial had been due to begin on Wednesday morning.
Zambia has enjoyed relative stability since its first multi-party election in 1991.
But last year’s election was marked by clashes between supporters of Lungu’s Patriotic Front (PF) party and the UPND.
Lungu also invoked emergency powers in July, increasing police powers of arrest and detention after he blamed opposition parties for a string of arson attacks.
Download our app and read this and other great stories on the move. Available for Android and iOS.