Twenty-six passengers were rescued from the coach S 11 which was completely gutted, Nellore Collector Sridhar said.
As the train was passing through Nellore, which is about 150 kms from Chennai, some people noticed the fire and informed railway authorities.
Two of the injured were in a serious condition, he said.
"The death toll in the affected coach will be around 30-35," he said.
The coach had around 70 seats.
"There was a short circuit near the toilet and the train was moving at a speed of 110 kms per hour. It was going to Chennai from Delhi. All the passengers were asleep when the fire broke out at 4:30 AM. People were not able to come out immediately," he said.
"The fire spread fast and the passengers could not come out through one of the doors because of the fire. So the other edge of the coach was to be used. Some people could come out and others succumbed to death," he said.
The bodies have been charred so it is difficult to identify them, Sridhar said.