Police were called to an address in Scholemoor Avenue, Bradford at about 7.36pm on Thursday after gunshots were reported.
Firearms officers attended and confirmed there had been a discharge with damage caused to a door and window.
The occupants of the address were found to be safe and well.
Further enquiries established that a 21-year-old man had presented himself at hospital with suspected gunshot wounds to his back.
He remains in hospital in a stable condition.
Enquiries are continuing at the scene and anyone with information is asked to contact the Homicide and Major Enquiries Team on 101 or report anonymously to Crimestoppers on 0800 555111.

Plans Revealed for New 18.5km West London Overground Route
West Yorkshire Police Warns Against Accepting Parcels for Cash
£505,000 Investment Proposed to Step Up Fight Against Fly-Tipping in Blackburn with Darwen
More Than 1,500 Fireworks Incidents Recorded Across West Yorkshire but Just 10 Arrests
Milton Keynes 12-Year-Old Scores in Top One Per Cent in Mensa Tests
Suspected £6,000 Drugs Haul Seized in Manchester City Centre
Halifax Residents Asked How £20m Community Investment Should Be Spent
Former Girlington Allotment Site to Become New Community Park
Three Men Jailed Over UK’s Largest Illegal Phone Smuggling Network
Piccadilly Gardens Transformation Approved with Work to Start This Autumn
Four Keighley Shops to Appeal Alcohol Licence Bans
Fresh Concerns Raised Over Proposed Night Flight Rules at Leeds Bradford Airport
Bhangra Nights
The Golden Era
Remix Saturdays
Alim OnAir