It happened around 8 p.m. on the 5500 block of North 4th Street.
Investigators said a 23-year-old man has turned himself into police in connection to the incident.
Police said the man, who is known to the family, was playing with a group of children inside a home when for some unknown reason the gun fired.
4-year-old child shot in Olney; suspect in custody: Police
Police say the 4-year-old boy was shot in the hip and transported to Einstein Medical Center hospital where he's listed in critical but stable condition.
According to police, the shooter initially left the scene with another man in a car.
It is unknown what, if any charges he is facing at this time.