Dean Alan Rothwell, 38, of Mytholmroyd, pleaded guilty to racially motivated anti-social behaviour and criminal damage at Manchester and Salford Magistrates.
He was also ordered to pay £115 compensation.
The court heard how shortly after midnight on Friday, November 18 last year, Rothwell approached a member of station staff at Manchester Victoria enquiring about how he could get home as he had fallen asleep and missed his stop.
When the staff member advised that the last train had left, Rothwell became aggressive and demanded that an empty train, which was due to be returned to the depot, take him home.
The staff member advised this would not happen and told Rothwell the next train would leave around 5am. When Rothwell demanded that he should be allowed to use a phone charger in the platform office, he was told the office was locked but that payphones were available on the first floor.
As Rothwell made his way up the stairs to the payphones he became abusive, shouting racist and personal insults at the staff member, who was forced to hide away from him in a bid to continue his duties out of sight and without fear of harassment.
The staff member then returned to his office, believing the coast was clear, but Rothwell returned and began shouting racist abuse, making threats and demanding to be let in, kicking and punching the glass door to gain entry.
Frightened and vulnerable, the staff member called British Transport Police to attend while Rothwell smashed a payphone at the station.
When officers arrived Rothwell was arrested while kicking the glass door.
In interview Rothwell claimed he saw red when he was told he had missed his last train. When his actions and racist comments were described to him he agreed it sounded like something he would do before claiming it was out of character.
Investigating officer PC Lee Valentine said: “Falling asleep on the train and missing your last stop is unfortunate but it is the responsibility of the individual and not the fault of station staff.
“Rothwell’s terrorising of this man simply because he did not like what he told him is completely abhorrent and will not be tolerated.
“The fact that Rothwell received a custodial sentence is testament to the serious nature of his behaviour.
“Hate crime and abuse of station staff will not be tolerated. We will always seek to prosecute the individual responsible.”