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.

Controversial 500MW Solar Farm Spanning Milton Keynes and Northamptonshire Approved Despite Environmental Concerns
Nine People Charged with 49 Offences Following Major Police Raids in Rochdale
Calderdale Youth Justice Service Praised for Supporting Young People Despite Inspection Rating
Bradford Driver Jailed After Ramming Police Car in Huddersfield
Labour Loses Control of Hounslow Council After Councillor Charged with Fraud
Manchester Communities Invited to Apply for Remembrance Sunday Grants
Keighley Women and Children’s Centre Completes Major Expansion
Milton Keynes Man Convicted of Daesh-Related Terrorism Offences
Leeds Bradford Airport Workers Announce 48-Hour Strike
Bradford Youngsters to Mark World Food Day with Cookery Challenge
Four Men Charged Following Series of Warrants in Rochdale
Legal Show
The Golden Era
Bhangra Nights
Remix Saturdays