Tokukara Nguvauva repeatedly punched the 71-year-old, who needs a walking stick, outside of the convenience store on Wakefield's Balne Lane.
Footage from the store's external CCTV from March 28 was played to Leeds Crown Court and showed the elderly man struggling on the floor as Nguvauva rained blows down on him.
As people tried to intervene, he is then seen walking away and returning several times, shouting at the terrified man and throwing more punches.
Prosecutor Emma Handley said the elderly man had asked Nguvauva to stop urinating up against the side of the shop as he got into his vehicle parked outside.
Nguvauva, 21, then walked over to the car and confronted the man before throwing the first punch through the window, followed by multiple punches and kicks as the man got out of the car.
He then began shouting racist remarks to towards him as he lay stricken on the side of the road, saying: "Before I die I will take a white man's neck".
When the police arrived he then began making abusive comments towards officers, calling them "white b*stards".
He accepted what he had done but said the man tried to hit him with a walking a stick. Luckily, the elderly man only suffered cuts and bruises.
‘A tendency to lose control’
Nguvauva, of Agbrigg Lane, Wakefield, said had been drinking at the time and needed help for his problems with a tendency to lose control.
He admitted a charge of racially-aggravated assault occasioning actual bodily harm and racially-aggravated harassment towards the police officer.
Nguvauva, who appeared in court via video link from HMP Leeds where he was on remand, has five previous convictions including attacks on police and an emergency worker.
He was on a community order at the time.
Mitigating, Joseph Hudson, said Nguvauva was a polite young man but had anger issues and was "in a hole". He had ambitions of joining the Army but was uncertain if his criminal record would allow him.
Judge Christopher Batty handed him a 19-month jail term and said: "You are 21 and already you have an unenviable record for violence.
"At this moment in time, you have perceptions that anyone who deals with you in a way you do not like, it is because they are racist.
"You were urinating outside a shop and quite rightly, this man told you to stop it. Standards are falling.
"How on earth you took that to be a racially-inflammatory comment I do not know.
"He probably won't get over this. I can't imagine being on the end of such an appalling assault."
A version of this article originally appeared on the Wakefield Express