Thick black smoke was seen pouring from the stern of HTMS Khirirat of the First Frigate Fleet as it docked at the Sattahip Naval base at noon.
Firefighters backed by four fire engines took about 30 minutes to control the blaze.
The fire was caused by an explosion triggered by an artillery shell accidentally discharged from HTMS Chonburi, which was docked nearby, said naval officers speaking on condition of anonymity.
The blast reportedly left two officers with severe injuries.
Sources said HTMS Chonburi returned from a firing drill on Wednesday with one artillery round still stuck in its guns.
The round reportedly discharged as Navy engineers were trying to remove it.
The Navy has yet to make an official announcement on the cause of the explosion and fire aboard HTMS Khirirat.
The two severely injured naval officers were identified as Chief Petty Officer First Class Surinya Nitboonkrong and Petty Officer First Class Jakarin Thongmanee.
All casualties were rushed to Sirikit Hospital.
HTMS Khirirat is a patrol frigate that has been in operation for 50 years.
It was built by Norfolk Shipbuilding & Drydock Corporation in the United States. The frigate is equipped to fight air, surface and underwater enemies.