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.

Fare Dodger Admits Assaulting Police Officer at London Tube Station
Aylesbury Drug Dealer Jailed for Two Years
Leeds in Running to Host 2035 FIFA Women's World Cup Matches
Bradford Hospital Staff Unite to Rescue Stray Cat Family
Richmond Council calls for West London Orbital extension
Seven jailed for helping Iranian nationals enter UK illegally
Leeds man jailed after naming false driver in speeding case
Final four men jailed for child sexual abuse in Bradford case
London SEND School Becomes First in England to Win World's Best School Prize
New and Improved Bus Services Launch Across Blackburn with Darwen
Reopening Keighley Tip Unlikely to Reduce Fly-Tipping, Council Warns
Leeds Economy Strengthens as City Targets 100,000 New Jobs
Legal Show
The Golden Era
Alim OnAir
Remix Saturdays