Andrew Whitson and Paul Swan admitted the breach under the Offensive Behaviour at Football and Threatening Communication (Scotland) Act 2012, and have both been banned from attending games for a year.
Whitson, 28, from Kitchener Crescent, Longniddry, was fined £180, while Swan, 39, of Coronation Place in Tranent, was ordered to pay £200.
The pair were travelling home after watching Hibs beat Ayr United on Saturday, to progress to the Scottish Cup semi-finals, when the incident happened.
They had boarded the 6:13pm train from Ayr to Glasgow Central when they were seen by British Transport Police officers chanting and singing songs that were “of a racially derogative nature” and were arrested.
They pled guilty during an appearance at Glasgow Sheriff Court on Monday. Police said the convictions should act as a warning to others.
Chief Superintendent Ellie Bird, of the British Transport Police, said: “These convictions and sentences send out a clear message that this sort of behaviour and criminality has no place in society, and certainly not on our rail network.”
Hibs said the club took a strong stance against bigotry.
A spokesman said: “Through the protocol agreement, Hibernian FC will be sent full details in due course from the British Transport Police and will then take appropriate action.
“Hibernian FC cannot condone any form of unacceptable behaviour.
“Hibernian FC has worked positively and productively with the police and Scottish Government as part of the consultation process which led to the new legislation focused on tackling sectarian and offensive behaviour.”
Police were not able to say exactly what chants and songs were being sung.
The new legislation has been controversial and sparked protests both at games and in the Scottish Parliament.
One concern raised has been that no definitive list of offensive songs has been revealed, and critics have questioned whether fans will always know if they are committing a crime.
The act came into force on 1 March and the first arrests took place at a game between Rangers and Hearts at Ibrox on the following Saturday.
The act also aims to tackle online abuse and, on 5 March, a 20-year-old man was arrested for threats aimed at Celtic manager Neil Lennon which were posted on a social networking site.
The Scottish Government says the new laws are vital for tackling bigotry and hatred in football.
A spokeswoman said: “We listened to police and prosecutors when they told us they needed greater powers to take a hard line on religious, racial or other forms of hatred at football.
“These new laws make it very clear that offensive and threatening behaviour will no longer be tolerated and there should be no mistake that those who promote it will feel the full force of the law.”