Ross McPherson, 24, of Teville Road, Worthing, was found guilty of committing attempted grievous bodily harm with intent and affray on December 4 last year.
The court heard there was a joint operation being carried out between Sussex Police and British Transport Police into bike thefts and drug crimes around Worthing railway station.
During a routine stop check, McPherson was stopped but became verbally abusive and threatening towards three police officers.
Due to his behaviour, he was sprayed with Captor spray but he continued to be aggressive.
As an officer went to draw his baton, he dropped it during a tussle with McPherson and it landed at his feet.
McPherson picked up the baton and took a swing at two women police officers narrowly missing their heads and upper bodies. He then chased two police officers up the street with the baton.
More plain clothed officers came from the station to assist the Sussex officers and one of them was struck on the head a number of times with the police baton. Fortunately he did not receive severe injures.
McPherson was eventually stopped and arrested.
He went on trial last week at Woolwich Crown Court and after a five-days was found guilty of the two charges and sentenced.
After the case Detective Sergeant Andy Hobden said: “The sentence sends out a clear message that violence towards police officers who are doing the job and exercising the powers bestowed upon them will not be tolerated.”