Anwar, 66, and two other members of his party were charged in 2012 with violating newly enacted restrictions on public gatherings as well as a court order banning the rally from the centre of the capital Kuala Lumpur.
But the charges were dismissed after a separate court ruled on Monday that the ban on the gathering was invalid, Anwar's lawyer Ram Karpal said.
Tens of thousands had gathered April 28, 2012 to demand reform of an electoral system that critics say is biased toward the ruling coalition that has controlled Malaysia since independence in 1957.
"The rulings show that the authorities have to respect the right of citizens enshrined in the constitution to assemble peacefully," he told AFP.
More From This Section
A former deputy prime minister and rising ruling-party star, Anwar was sacked in a 1998 falling-out with his boss, then-premier Mahathir Mohamad, and jailed on sodomy and corruption charges in an episode that rocked Malaysian politics.
The charges were widely panned as politically motivated.
Released from jail in 2004 when the sodomy conviction was overturned, Anwar formed an alliance of opposition parties that has put increasing pressure on the ruling Barisan Nasional coalition in parliamentary polls in 2008 and last year.