A spokeswoman for the force said MacKinnon, 47, had been drinking and was seated in the first class carriage of a London to Glasgow last month when he shouted at the boy to be quiet.
She said: "When the child’s mother asked him not to shout at her son, he replied with a barrage of racist abuse, demanding to know where she came from, why didn’t she go back there and that she shouldn’t be travelling in first class.
"His victim began to cry and reported the man to a member of rail staff.
"The train manager was informed, who told MacKinnon he would be taken off the train at Carlisle and met by police.
"He responded by continuing his racist rant, accusing his victim of wasting police time by reporting the matter and adding that she shouldn’t be in this country.
"In police interview MacKinnon continued to be abusive and racist about his victim."
Investigating officer PC Mark Mellenthin said: “The victim was visibly distressed and shaken by MacKinnon’s frightening racist outburst.
"Thankfully, the train manager stepped in before the abuse escalated.
“People like MacKinnon must understand that abusive, racist behaviour like this has no place on the railway and will not be tolerated.
Everyone has the right to travel in safety without fear of abuse like this, violence or intimidation.
“When it does happen we will do everything in our power to bring them before the courts.
"Hopefully MacKinnon’s substantial fine will make him think twice before unleashing such vitriol on other members of the public.”