The court ordered the military tribunal that began hearings against Fonseka in March to halt its work until a decision has been made on the validity of the military's legal proceedings.
Fonseka, who was defeated at January presidential elections by the incumbent, Mahinda Rajapakse, was arrested soon after the polls and charged with engaging in politics before he quit the army in November.
He also faces a second court martial on charges of corrupt military procurements.
He says both sets of charges are part of a political vendetta.
Fonseka last year led the military to victory over Tamil Tiger rebels, ending decades of ethnic conflict on the island, but he and Rajapakse later fell out.
He remains detained at Colombo's naval headquarters, from where he contested parliamentary elections in April, winning a seat in the 225-member assembly.
"The suspension of the first court martial is a big victory for General Fonseka," fellow legislator Tiran Alles told AFP.
"Now that we hav