A driver taking two young men home from a party in Malvern was arrested by police after reports that his passengers had fired a ballbearing gun at another car.
Alan Waggott was followed through Worcester and failed a breath test when he was stopped, said Paul Whitfield, prosecuting, at Worcester Crown Court.
Waggott, aged 30, of Lansdowne Court, Priory Road, Malvern, was jailed for three months after he pleaded guilty to carrying an imitation firearm in a public place.
The court was told that he had already admitted drink-driving before magistrates and been fined £350 and disqualified from driving for 20 months.
Mr Whitfield said it was just after midnight on February 2 when a hire-car driver reported that a ball-bearing fired from another car had hit his windscreen.
When Waggott was eventually stopped, he was obviously drunk as he stepped out of the car. He said he had drunk seven or eight cans of cider. Two 17-year-old youths were passengers.
Richard Hull, defending, said Waggott had been house-sitting for a friend and was taking the youngsters home. They had since appeared in court for possession of imitation firearms and been made the subject of referral orders.
Waggott was a man of good character but had been affected by losing his job in January. He intended to move to Newcastle.
Judge John Cavell said the shooting incident must have been shocking and terrifying for the other driver.
Waggott knew there was a gun in the car but had driven drunk in charge after midnight.
The judge said: “What on earth possessed you to behave in that way?
“There is no sensible answer in the reports that I have seen.”