The shots were heard by residents around Bentley Road, Wakefield, on Monday night.
The incident has been linked by detectives investigating an affray in Chickenley, Dewsbury, on Sunday evening.
Officers were called just after 6.45pm to Cedar Drive, Chickenley to a report that a car had been driven directly at a man in his 40s. He managed to move to safety and was uninjured.
The vehicle involved was then in collision with a lamppost and a vehicle on the street.
A police spokeswoman said it has since been linked to further offences in Princess Crescent, Chickenley, where a firearm was discharged at the door of a property and damage to a parked vehicle at around 11.05pm.
A further call was then received at 11.19pm reporting gun shots on Bentley Road.
Det Supt Pat Twiggs of the Protective Services (Crime), said: “I understand that these incidents, and the resulting increased police activity in the area, will cause some concern in our communities.
“I would stress that we are treating these as targeted attacks involving parties known to each other. We will not tolerate people taking the law into their own hands and clearly any use of a firearm is something we take extremely seriously.
“There are extensive enquiries ongoing and I would ask for the public to work with us as our investigation continues.”
Anyone with information about any of these incidents is asked to contact the police via www.westyorkshire.police.uk/contact-us.