A gun was fired through the front door of a home in Dewsbury.
The shot was aimed at the house in Burgh Mill Gardens, a quiet cul-de-sac of family homes, at around 9pm on Saturday.
There were people inside at the time but nobody was injured.
Police believe the home was deliberately targeted.
Det Chief Insp Stephen Snow, who is leading the investigation, said: “I would like to reassure members of the local community that there is no risk to the general public following this incident.
“However, we understand the impact that any discharge of a firearm has on the community and on feelings of personal safety. We have increased visible patrols in the area and are happy to speak with anyone who has any specific concerns.
“We are also keen to hear from anyone who can assist with our investigation.”
A 24-year-old man from the Dewsbury area was later arrested and bailed pending further inquiries.
Witnesses and anyone with information can call police on 101 or contact Crimestoppers anonymously on 0800 555 111.