The shooting happened around 10:40 a.m. at a home in the 1900 block of Georgian Road.
The children live with their grandparents at the home where the shooting took place.
Police say the gun was kept dismantled inside a lockbox, but the child managed to get the keys, unlock it, and put the gun together.
The two children were in the little girl's bedroom as the boy was playing with the gun. It went off, police said, hitting the young girl in the bicep.
Her grandparents heard the shot and came running, put the gun away and rushed her to the hospital.
The girl was taken to the emergency room at Einstein Medical Center with non-life-threatening injuries. She has since been transferred to Children's Hospital of Philadelphia where she remains in stable condition.
Action News was outside Northwest Detectives as the little boy, wearing a red sweatshirt, was led into the police station.
"The kid is very shook up. He's not happy with what he did and he knows he did something wrong," said Lt. George McClay of the Philadelphia Police.
Friends and neighbors say this is a tight-knit family and their thoughts are with them at this time.
"They're a wonderful family. Really, they're just a close-knit family and I know this was an accident," said family friend Beverly Jackson.
While precautions were taken, police say there are better ways to secure your weapons from curious children.
"You have digital safes, things like that. You make sure kids don't know the combination. That's the best way to do it," said Lt. McClay.
The gun was registered, police say, and while the investigation continues it does not appear any charges will be filed.