The government quickly shut down the website and warned the perpetrators they faced tough punishment if caught.
"It might have been done by some teenagers... Or maybe it was for political purposes," said the prime minister's secretary-general, Suranand Vejjajiva.
"Hacking a website is easy... But don't forget that checking who did it is not hard either," he told reporters.
"If we find them, they will be charged under the computer crime act," he said, referring to a contentious law that rights groups say is sometimes used to muzzle online dissent.
More From This Section
The post apparently took aim at the premier's appearance at a democracy forum a day earlier in Mongolia where she gave an unusually fiery speech condemning the 2006 coup that toppled her brother Thaksin as premier.
Since then debate has flared over what is an acceptable level of criticism of the premier, who won a landslide election victory in 2011, becoming Thailand's first female premier.
The kingdom has been riven by political divisions since the 2006 coup, with a series of rival street protests.