The man was shot on the Lion Farm Estate in Oldbury at around 4.50am on Saturday morning.
He was in a serious but stable condition on Sunday morning and his injuries are not thought to be life-threatening, West Midlands Police said.
No arrests have been made and the force has not yet confirmed the age of the victim.
The shooting happened near the Badsey Road and Shelsley Avenue junction, next to St James C of E Primary School.
The roads were closed while forensic investigators examined the area.
Police tape cordoned off the roads and buses were being diverted around the crime scene.
The National Express 3 and 3A and Diamond Buses 20 services were affected.
A spokesman for West Midlands Police said on Sunday: "He remains in hospital in a serious but stable condition.
"No arrests have been made and investigations are ongoing."
The victim is the second person to be shot in the leg in Oldbury in the last seven weeks after a 20-year-old man was seriously injured in St Johns Road in June.
Anyone with information is asked to call West Midlands Police on 101, quoting log number 770 of August 1.
Alternatively, call Crimestoppers anonymously on 0800 555111.