The fire was reported about 2 a.m. as the train was traveling from Mumbai in western India to Dehradun in the northern state of Uttarakhand.
The fire broke out in one of the sleeper cars and spread to two others when the train was about 90 miles north of Mumbai, TV channel NDTV reported.
The Times of India reported the train was near the Dahanu railway station in Maharashtra state at the time of the fire.
The Hindustan Times said the fire was noticed by an attendant at a railroad crossing, who later informed the engineer and the train was stopped.
CNN-IBN channel reported firefighters were able to contain the blaze in about 3 hours.
All the other passengers were moved to other cars and the train later traveled to Dehradun, the report said, quoting a railway official.
The cause of the fire was being investigated.
Late last month, 26 people died in another train fire in southern India.