West Yorkshire Police said detectives were investigating the firearms incident at Mayo Avenue and Rooley Lane in the city which happened in the early hours of Sunday morning.
The 17-year-old was treated for non-life threatening injuries following the shooting, which is thought to be connected to an altercation at a nearby house party earlier in the evening.
Officers sealed off the road near to the scene on Sunday following the shooting which happened at around 2am.
Detective Chief Inspector Sharron Kaye for the force's Protective Services Crime unit said: “I would urge anyone with information about this incident to contact police.
“We have a number of officers in the area providing a reassuring presence and carrying out investigations."
Anyone with information should contact the force on 101.
Support The Yorkshire Post and become a subscriber today. Your subscription will help us to continue to bring quality news to the people of Yorkshire. In return, you'll see fewer ads on site, get free access to our app and receive exclusive members-only offers. Click here to subscribe.