It happened around 9:15 Friday evening near the intersection of Rising Sun Avenue and Van Kirk Street.
Police say it appears that the 12-year-old and a 21-year-old man were walking together when shots were fired.
The 21-year-old, who police believe was the intended target, was shot in the chest and is in critical condition at Einstein Medical Center.
The 12-year-old boy was shot in the leg and is hospitalized in stable condition.
Authorities say the gunman was seen wearing a black t-shirt and army fatigues.
No word on a motive on any arrests.