In his speech, Fonseka called himself a "victim of illegal detention" and demanded his freedom.
"The freedom of the people is very imortant at this time," he said.
"I hope all in this house [parliament] will unite to defend these rights. As a victim of these injustices, I'm happy that I could enter this house for the first time and express these views."
Court martial adjourned
Fonseka's court martial, on charges of engaging in politics while in uniform and involvement in corrupt arms procurement, was adjourned on Tuesday for two weeks.
The comments from Fonseka, who says his court martial is politically motivated and designed to silence him, were his first remarks in public since his detention on February 8.
He helped crush the separatist Tamil Tigers, but later fell out with Rajapaksa and unsuccessfully tried to unseat him in presidential elections in January.
Following a revote on Tuesday in some areas affected by fraud, final results showed that the United People's Freedom Alliance (UPFA) coalition of Rajapaksa had won a landslide victory.
However, it failed to gain the two-thirds majority that could allow it to change the constitution.
The governing coalition's closest rival, the United National Party (UNP), won 60 seats in total, results showed.
The UPFA's parliamentary sweep follows Rajapaksa's re-election in the country's presidential poll in January.
Sri Lanka's opposition has been weakened and fragmented after the arrest of Fonseka.
The opposition accuses Rajapaksa of stifling dissent, encouraging cronyism and corruption and trying to establish up a family dynasty, with several close relatives occupying senior government posts.
In powerful posts
Chamal Rajapaksa, 67, the president's older brother and a former minister of ports and aviation, was unanimously elected speaker of parliament in Thursday's session.
The president's younger brother, Basil, his son Namal and cousin Nirupama Rajapaksa are also among the UPFA's 144 parliamentarians in the 225-member assembly.
But Gotabaya Rajapaksa, Sri Lanka's defence secretary who is also a brother of the president, said one of Rajapaksa's priorities would be constitutional reform.
|Jayaratne, right, a close ally of Rajapaksa, left, has become Sri Lanka's 20th premier [AFP]
"The president has the mandate ... he has said that he'll speak to all the parties. I am sure now that he has a majority [in the house]. He has plans to [implement] constitutional changes," Gotabaya Rajapaksa told Al Jazeera.
He dismissed speculation that the president would seek more powers through constitutional reforms, saying: "He has all the powers; he doesn't need more powers."
In Thursday's other developments in Colombo, a veteran politican assumed the figurehead role of prime minister.
DM Jayaratne, 79, who becomes the country's 20th prime minister, has been in politics for nearly five decades, overseeing several important ministries.
Jayaratne was first elected to parliament in 1970 and is a founding member of the Sri Lanka Freedom Party, the second largest in Sri Lanka and the main party in the ruling coalition.
He will head the government in parliament, but Rajapaska has the power to appoint ministers, justices, military and police chiefs, or to dismiss them.