The incident took place on the 21:53 ScotRail service between Edinburgh Waverley and Perth on 14 April.
British Transport Police (BTP) said the man, who boarded the train at Waverley, tried to kiss the woman after making the remarks to her.
He was removed from the train by officers at Haymarket.
BTP said the man's details were taken and further inquiries were being carried out into the incident.
Police are appealing for witnesses after a man made sexually inappropriate comments to a woman in the first class carriage of a train.