The Constitutional Court has voted 5-4 in ordering Prime Minister Prayut Chan-o-cha suspended from duty.
The court's order came after it ruled to accept the petition asking for a ruling on his eight-year tenure as prime minister.
The petition was forwarded from Parliament to the court on Monday.
The opposition has asked the court to rule on his tenure, when it began and ends, as it is still open to interpretation.
Critics say his term should end on Wednesday as his first day in office should be counted from Aug 24, 2014, when he was named prime minister after leading a military coup in May, while his supporters say the count should start on June 9, 2019, after the present constitution came into force in 2017.
The court said on Wednesday the nine judges unanimously agreed to accept the petition for consideration and ordered the person named in the petition - the prime minister in this case - to counter the petition before the court within 15 days of receiving official notification. However, the decision to suspend him from work was by a majority vote, it said.
The court did not say when it will make a ruling on the issue raised in the petition.
Deputy Prime Minister Wissanu Krea-ngam has said previously that Deputy Prime Minister Prawit Wongsuwon would be the acting prime minister in the absence of Gen Prayut. Gen Prayut could continue to attend cabinet meetings in his capacity as defence minister, he said.