President Mahinda Rajapakse signed a decree liberating 1,669 people, including 57 women, jailed for minor offences.
The opposition United National Party boycotted Freedom Day celebrations in the town of Kataragama and organised a demonstration outside the Colombo prison where Fonseka is serving a 30-month sentence. He was jailed in September last year.
The military has offered to discharge all of the 50,000 personnel who deserted during and after the war without disciplinary action if they surrender to their units during an eight-day period starting Friday.
During the celebrations, Rajapakse promised to double per capita income over the next few years and press ahead with infrastructure projects.
But he warned that he was ready to make “tough decisions” in order to fight inflation, which has soared over the last few years.
At least five people were killed, five more were feared drowned and more than 250,000 displaced in Sri Lanka's floods which continued for the fifth consecutive day, officials said Friday.
During last month's floods, 43 people were killed and over a million displaced.