The officer and a colleague were driving along Dewsbury Road in Leeds in the early hours of July 20 when they saw Charlene Campbell sitting on the road, Leeds Crown Court heard.
Robery Galley, prosecuting, said Campbell, 37, was shouting, screaming and swearing.
Developers admit planning breaches in construction of Leeds retirement flats
Paedophile arrested at Leeds Bradford Airport after travelling from Ireland to meet ‘13-year-old girl’
Met Office issues thunderstorms and torrential rain weather warning for Leeds as heatwave comes to abrupt end
Major new £85m build-to-rent Leeds city centre development to go ahead following approval
How to see Lancaster bomber and Spitfire flypasts near Leeds at Yorkshire Wartime Village
Mr Galley said the officer asked Campbell to move before she used a term of racial abuse.
Mr Galley said: "The officer said he was deeply saddened by the defendant's actions.
"He had shown her the utmost respect to help and take her to a safe place.
"The defendant described that she had been drinking 'violent' gin."
Campbell, of Brownhill Crescent, Harehills, admitted racially aggravated harassment.
She committed the offence while subject to a suspended prison sentence.
At Leeds Crown Court on April 1 she was handed a two year prison sentence, suspended for two years imposed for an offence of robbery
Emily Hassell, mitigating, said: The defendant in her own words had become extremely emotional.
"She was upset. She was in the middle of the street. She was asking for help."
"She conceded that she can't remember the offence. She was in drink and was really sorry.
"She is not a racist and doesn't have any previous convictions for racially aggravated offending."
Judge Mushtaq Khokar jailed Campbell for three months for the racially aggravated harassment.
And he activated 21 months of the suspended sentence and ordered that she serve that sentence consecutively.
Cambell was jailed immediately for a total of two years.
IN OTHER NEWS: Woman sexually assaulted near Leeds rail station after leaving Wire nightclubJudge Khokar told her: "Whether your language, which you used against the police officer, was used in a drunken state and you are not a racist doesn't matter to the person who receives such abuse.
"Whether it's coming from a drunk person or a sober person, it's very, very hurtful."
Support the YEP and become a subscriber today. Enjoy unlimited access to local news and the latest on Leeds United, With a digital subscription, you see fewer ads, enjoy faster load times, and get access to exclusive newsletters and content. Click here to subscribe.