The three men were charged in a Kuala Lumpur court with defying a court ban against assembling at a public square in Kuala Lumpur last month and inciting other demonstrators to breach a police barricade.
They pleaded innocent and face a maximum jail sentence of six months and fines totaling 12,000 ringgit ($3,800) if convicted. The court scheduled a preliminary hearing on July 2 to determine further trial dates.
"It is clearly a politically motivated charge. Elections are around the corner," Anwar told reporters.
The prime minister's office rejected Anwar's claims of a political plot, saying in a statement that the charges were based on police investigations. It noted that two policemen and other people were charged previously in connection with violence during the rally.
The charges are the first against Anwar after he was acquitted in January of sodomizing a male former aide. The government has denied Anwar's claims that the sodomy trial was engineered to undercut an opposition alliance that made unprecedented inroads in 2008 elections.
Two others charged were Azmin Ali, the deputy president of Anwar's opposition People's Justice Party, and party youth official Baharul Hisham Shaharin.
They were among tens of thousands of Malaysians who joined a April 28 rally calling for an overhaul in electoral policies. Police used tear gas and water cannon against demonstrators after some of them breached a barrier at a public square that had been declared off-limits.
Phil Robertson, deputy Asia director at Human rights Watch, said the charges against the opposition leaders "don't inspire confidence that the Malaysian government is committed to protecting basic free expression rights."
Prime Minister Najib Razak and other officials have accused the opposition of trying to create chaos at the rally, which was organized by opposition-backed civic groups. Some people claimed Anwar and Azmin goaded peaceful demonstrators into charging at police.
If Anwar and Azmin are fined the maximum amount, they also risk losing their Parliament seats.
National polls are not due until 2013 but speculation has been rife that Najib will dissolve Parliament soon. Najib's coalition, which has led Malaysia since 1957, has slightly less than a two-thirds parliamentary majority after it suffered its worst electoral performance ever in 2008.
The rally's organizers had demanded the resignation of Election Commission officials, claiming they are biased. Demonstrators also wanted a clean-up of voter registration lists allegedly tainted with fraudulent names and fairer rules to ensure all parties get access to mainstream media.
Government officials insist the activists' concerns are overblown. The Election Commission last week said it hopes to help ease the criticism by potentially securing voting rights for 1 million Malaysians living overseas and inviting international observers for the elections.