A train guard alerted police about their behaviour and officers descended on Dunbar train station to meet the service.
The guard identified nine men causing problems to the officers and requested they be taken off. A police spokeswoman said: "Seven of these males left the train when requested to do so by police. Two members of the party refused and continued to be verbally abusive towards officers, causing alarm to those passengers present."
The two men, a 26-year-old from Norham and a 29-year-old from Berwick-upon-Tweed, were arrested for a breach of the peace before being taken to Dalkeith police station to be charged following the incident at about 8pm on 3 April. Both were reported for summons.
The other men, who were in their 20s and 30s, were from Edinburgh, Berwick-upon-Tweed, Newcastle, Norham and Northumberland.