Marek Zakrocki, 48, threatened to "kill a Muslim" before his attack outside Spicy Night in Alexandra Parade, Harrow, on 23 June.
Zakrocki, originally charged with attempted murder, admitted dangerous driving and battering his wife.
He also admitted drink-driving during sentencing at the Old Bailey earlier.
He will be released immediately for time served on remand.
The attack took place on the anniversary of the Brexit vote.
During the day of the incident, Zakrocki had got drunk on wine, grabbed his wife Ewa's arm and threatened to "kill people" and himself, a previous hearing was told.
His family called police and during a telephone conversation with an officer Zakrocki said: "I'm going to kill a Muslim. I'm doing it for Britain."
Arriving in Harrow town centre, he made a Nazi salute, pushed a man he assumed was a Muslim, swore at a Somali woman, shouted "white power" at people near a pub and then drove towards the Indian restaurant.
After threatening a member of staff with a torch, he drove into the restaurant's front windows, reversed and then drove into Mr Ahmed.
Mr Ahmed suffered no serious injuries but was badly shaken and scared.
Judge Anthony Leonard QC said: "You committed these offences at a time of heightened tension because of the attack on a Muslim outside a mosque in London."
The judge said there was evidence of "abhorrent" racist views but his crime was due to the effect of alcohol.
He added: "In your drunken state what you said and the way you behaved would have been both offensive and put persons in fear."
DC Georgina Acuna, the investigating officer from Harrow Community Safety Unit, said:
"Zakrocki deliberately armed himself with a knife and told both his family and officers that he intended to harm someone for their religious beliefs.
"This was a terrifying ordeal for the witnesses and victims. Zakrocki was almost three times over the drink-driving limit and it was through pure good-fortune that no one was injured during his rampage.
"I hope today’s sentencing gives Zakrocki’s victims some measure of comfort and closure."
IF ASKED: Why wasn't this treated a terrorist incident? Officers from the Met's Counter Terrorism Command carried out an assessment and concluded it was not a terrorist incident. Therefore it was investigated as a hate crime by Harrow Community Safety Unit.
IF ASKED: The assault plea relates to the incident in which the defendant grabbed his wife's arm forcefully.
Thanks for stopping by. We welcome your comments.