The victim, travelling from Gaya to New Delhi, was molested by Ameen Sheikh (28), who was in an inebriated condition, when she was asleep last night, station officer of GRP Ratan Singh Yadav said.
The girl raised an alarm and fellow passengers came to her rescue. The man was handed over to the Government Railway Police (GRP) at Mughalsarai.
Police said the man was drunk and does not have any past criminal record.
The girl, who is a resident of Gaya and studies in Delhi, told police that a few other pantry staffers were loitering around the wash room and were drunk.
A case has been registered and a probe is underway, said spokesman of the GRP.
This is the third incident of molestation on trains in Uttar Pradesh in less than a week.
The first was Oct 1 when a senior Indian Administrative Services (IAS) officer of the Uttar Pradesh government was arrested for molesting a woman on board the Lucknow Mail train.
Two days later, on Oct 3, another state government official was charged with outraging the modesty of a woman.
Photos: Raveena Tandon, Sohail Khan at Marathi film 'Bhay' music launch
SRK-Gauri anniversary: B-Town stars and their non-filmi better halves
Birthday special: Popular mothers and daughters in Bollywood
Spotted: 'Kaabil' star Hrithik Roshan with dad Rakesh Roshan
'Rock On 2' trailer launch: Farhan, Shraddha enthrall audience with live gig