The Prime Minister spent around 25 minutes in the temple premises.
He offered flowers, bel leaves, milk, coconut water and water to the deity.
Modi also visited the temple of Goddess Bhubaneswari and Parbati, said Manoranjan Panigrahy, CEO of the Lingaraj Temple Administration.
“The Prime Minister was so enthusiastic to know about Lingaraj temple. He prayed for the welfare of the nation and ‘Swachh Bharat’,” said chief priest of the temple.
The ‘seveyats’ or temple priests did not miss a chance to take selfies with the Prime Minister.
The 54-metre high temple is spread over a 25,000 sq.ft area and has over 150 small and big subsidiary temples in its premises.
Before his visit to the temple, Modi met the families of freedom fighters who were part of the Paika rebellion against the British East India Company in 1817.
He felicitated them at the Raj Bhawan.
Modi arrived here on Saturday to attend the two-day BJP National Executive meeting that began later in the day.
He also held a roadshow ahead of the meet.
The Prime Minister will address the concluding session on Sunday.