The disturbance occurred in the Whiston area of Knowsley, Merseyside, at about 18:00 BST on Friday, involving a VW Passat which was later found abandoned.
A 24-year-old passenger in the Passat suffered serious injuries and remains in a critical but stable condition in hospital.
Four men have been arrested on suspicion of firearms offences.
The 20-year-old driver of the car suffered minor injuries and was arrested after being treated.
Two passengers - men aged 20 and 21 - were uninjured and have also been arrested.
A 17-year-old boy from Huyton was arrested a short time later.
Merseyside Police said detectives are treating the shooting as a targeted attack between two "criminal factions who are clearly in dispute".
Assistant Chief Constable Ian Pilling said: "It is only by luck that no innocent bystanders were hurt."
Parts of Copperwood Drive and Cumber Lane remained cordoned off on Saturday as the police investigation continued.
Officers are now searching for the second car, a dark coloured Audi, a police spokesman said.
A man has been critically injured after gunfire was exchanged between men in two cars during a high-speed chase.