The local media reported that the blaze broke out at the site, located in the city of Naha, shortly before 02:40 a.m. on Thursday (17:40 GMT on Friday).
The authorities dispatched more than 10 fire engines to the site, the reports added, citing the local fire department.
There have been no immediate reports about casualties provoked by the blaze. The police are working to determine causes behind the fire.
Helicopter footage released by the NHK broadcaster showed the blaze destroying the castle.
【動画】沖縄 首里城の火災、上空からの映像です。https://t.co/DR8RG4zTyj#nhk_news #nhk_video #首里城 pic.twitter.com/P1wWmdDkiC— NHKニュース (@nhk_news) October 30, 2019
Around Shuri Castle is dangerous due to leaping sparks, Police says.#Okinawa #ShuriCastle #Japan pic.twitter.com/LMaEu9PHC7— 🇯🇵Origami🏳️🌈 (@origami444) October 30, 2019
The police, cited by the NHK broadcaster, said that the main hall and a nearby building had burned to the ground, while another nearby building had also caught fire.
The castle is part of a complex of monuments and buildings representing the history of the Kingdom of Ryukyu, which existed on the Ryukyu Islands between the 15th-19th century.
The popular tourist site was included in the UNESCO World Heritage list in 2000.