Kieran Paul Cassidy, 33, from Scarborough was arrested on Wednesday, April 8.
While in custody at Scarborough Police Station he become violent and started punching officers.
He then began to cough in their faces and saying that he had coronavirus.
Cassidy pleaded guilty to two charges of assault on emergency service workers.
COURT: Scarborough brothers threw man around 'like a rag doll' during vicious street attacks
Scarborough seaweed farm SeaGrown win Government contract to help increase renewable energy
Vandalised Scarborough allotments to be restored as council approves plans to help tackle hundreds stuck on waiting lists
Firefighters respond to Whitby railway blaze and arson in Scarborough
Police issue appeal to find missing Bridlington man Cameron
He was sentenced to six months in prison after appearing at Leeds Magistrates Court on Tuesday, April 21.
Superintendent Andrea Kell, Commander for Scarborough, said: "At a time when communities are coming together to face the extreme challenges of a global pandemic, I am appalled that anyone could behave in the way Cassidy did.
"Assaulting a Police Officer in their line of duty is utterly unacceptable and extremely shocking. To threaten to infect them with a deadly virus is a truly despicable act.
"As can be seen with Cassidy’s sentence, anyone suspected of committing this type of crime can expect to face prosecution."