Jurors heard how the windscreen of Asif Khan's BMW was damaged but he escaped unharmed during the incident in Beeston, Leeds.
-> Man had to have skull surgery after being stamped on and kicked at Leeds barLeeds Crown Court heard Mr Khan was "the intended victim" when shots were fired at close range from a sawn-off shotgun from a VW Passat.
Two men in the Passat were wearing balaclavas.
David Brooke, QC, said Mr Khan, who had a passenger in his vehicle, managed to "ram" his way out and get away without injury.
Two teenagers in hospital after crashed motorbike sets on fire on Leeds street
Leeds Olympian Nicola Adams and girlfriend Ella Baig reveal baby boy's name as they talk about parenthood
17 pictures you'll only understand if you're from Leeds
Caught on camera Leeds: West Yorkshire Police need to speak to these people urgently
Residents describe terror of fleeing fiery Leeds tower block as arrest made over arson
-> Armed police called to Leeds tower block after man with handgun seen entering flatsThe incident happened at 1.45am on October 28 last year, on Back Maud Avenue, behind Mani's Fisheries.
Mr Brooke said relatives of the Khan family were the victims of arson attacks three days later when two cars, worth £70,000, were set alight.
The jury was told an Audi Quattro, worth £50,000, and a VW Golf, worth £20,000, were set alight outside a house on Norborough Road, Tinsley, Sheffield.
Mr Brooke said neighbours who witnessed the incident in the early hours of October 31 were threatened.
One of the men involved in the alleged arson attack also swung an axe at a passing taxi.
Five men are on trial over the two incidents.
-> Man left critically ill after 'punch' in Leeds streetWakkas Butts, 25, of Cross Flatts Road, Beeston, denies conspiracy to possess a firearm with intent to endanger life, arson being reckless as to weather life is endangered and affray.
Shezan Shabir, 25, of Old Mill View, Dewsbury, denies the same charges.
Irshad Badar, 22, of Rowliff Road, High Wycombe, denies conspiracy to possesses a firearm with intent to endanger life and affray.
Aadil Malik, 22, of Lynndale Avenue, Birkby, Huddersfield, denies arson being reckless as to whether life is endangered and affray.
Adil Qayyum, 24. of Pickles Street, Batley, denies arson being reckless as to whether life is endangered, arson and affray.
Mr Brooke said: "The police investigation revealed that these were planned attacks, for which these defendants did everything they could to disguise or hide their whereabouts.
"For example, they met and stayed in various hotels you will hear about, using false cards and false details to book and pay for those hotels.
"They used vehicles that bore unregistered or false registration plates, swopped in and out of various vehicles and even went so far as to purchase a change of clothes after the shooting, all to conceal and hide evidence of what they were doing."
The trial continues.