The actor, who was on 'Sri Ganesha deeksha', later admitted of carrying the weapon by mistake and also apologised over the incident.
According to Kanipakkam SHO Murali, the actor entered the temple through a separate entrance gate meant for VIPs carrying the pistol without his knowledge.
The actor offered 'darshan' and it was only after some local Telugu TV news channels showed the actor carrying a pistol inside the temple, he realised his mistake, the police officer said.
During enquiry, the actor voluntarily admitted of carrying the weapon. He requested the police that he has to go to Chennai due to some medical emergency, he said.
"In view of his request, we asked him to appear before the police next week. Once he appears, we will ask him further and take appropriate action based on it. It is a licensed weapon and he has given us photocopies of the documents of the weapon," the SHO told PTI.
It was only later that the actor was informed by someone that local channels are showing footage of him carrying pistol.
Raj, who has worked in several Telugu, Tamil, Kannada and Malayalam films, later told reporters that he carried the pistol inside the temple unknowingly.
"I drove from Chennai to Kanipakkam this morning and reached the temple at 6.30 am. I went inside the temple in a hurry without removing the gun pouch. It was only after coming out of the temple, I realised that I had carried the pistol. I did it without knowing," the actor said.
"I would like to apologise to the temple authorities and all the devotees. It is a mistake," he added.