The original, Kandaswamy Temple was founded in 948. According to the Yalpana Vaipava Malai, the temple was developed at the site in the 13th century by Puveneka Vaahu, a minister to the Jaffna King Kalinga Magha. Sapumal Kumaraya (also known as Chempaha Perumal in Tamil), who ruled the Jaffna kingdom on behalf of the Kotte kingdom is credited with either building or renovating the third Nallur Kandaswamy temple. Nallur served as the capital of the Jaffna kings, with the royal palace situated very close to the temple. Nallur was built with four entrances with gates. There were two main roadways and four temples at the four gateways.
The present rebuilt temple that exist now do not match their original locations which instead are occupied by churches erected by the Portuguese. The center of the city was Muthirai Santhai (market place) and was surrounded by a square fortification around it. There were courtly buildings for the kings, Brahmin priests, soldiers and other service providers. The old Kandaswamy temple functioned as a defensive fort with high walls. In general, the city was laid out like the traditional temple town according to Hindu traditions. Cankilian Thoppu, the facade of the palace of King Cankili II, can still be found in Nallur. The third temple was destroyed by the Portuguese Catholic colonial Phillippe de Oliveira in 1624 CE.