Passengers were evacuated from the train at Petersfield Station. The drama occurred in the fifth carriage of the 10.15am South Western Railway train from Portsmouth to London.
Four fire engines and two support vehicles from Petersfield, Horndean, Liphook, Havant, Bordon and Portchester attended from 11.02am to 12.40pm.
A South Western Railway spokesman said the smoke was because of an “electrical issue”, while a spokeswoman for Hampshire Fire and Rescue Service added the burning smell was down to “overheated brakes”.