Demonstrators are protesting about comments attributed to a Thai actress demanding the return to Thai control of Angkor Wat, which has been the subject of a dispute between the two countries for many centuries.
CAMBODIAN-THAI TENSIONS
Latest reports say up to 1,000 people have moved on to attack other buildings.
Thai Prime Minister Thaksin Shinawatra reacted angrily to the news of the violence and initially said he could send in troops to rescue Thai nationals.
However, shortly afterwards, a Thai official said the prime minister had decided not to send in the troops on Wednesday.
Flag burning
Reports of the comments - which have been strongly denied by the actress Suvanant Kongying - sparked nationalist demonstrations.
After a day of flag-burning and anti-Thai chanting, a crowd massed outside the embassy towards nightfall. Police fired shots into the air but there were no immediate reports of casualties.
Rocks were thrown into the compound, smashing windows, before the arson attack. Reports say flames engulfed most of the building as crowds ran amok in the compound, setting fire to furniture.
A number of embassy staff said they scaled the walls of the embassy complex to escape the violence. All of the staff are now said to be safe.
On Monday, Cambodian Prime Minister Hun Sen banned a Thai-made television serial starring Suvanant, and exclaimed that she was worth less than the "grass that grows around Angkor temples".
Ms Suvanant was quoted by the Bangkok Post on Wednesday as saying that the comments were taken from a line one of her characters said in a TV drama which aired two years ago.
"I have never given an interview on Cambodia. I am not prejudiced against Cambodia or Cambodian people. I am sorry those allegations hurt so many people,"' she told the paper.
There are more than 100 temples at Angkor. It dates from the time of the Khmer empire - of which it was the capital - which ruled parts of South East Asia from the 9th to the 15th century.
The Khmer empire was overrun by the Thais in the 15th century, becoming little more than a vassal state.
In the modern era there have been regular disputes over borders and Cambodian perceptions that Thai companies are over-exploiting Cambodian natural resources.