Investigators say the shooting happened just before noon on Thursday on the 1600 block of 29th Street in the Strawberry Mansion section of Philadelphia.
Police say the toddler was home with seven other family members at the time of the shooting.
"It appears as though a 14-year-old was able to access an unsecured firearm inside of the house, and while handling that weapon fired at least one shot, striking a two-year-old girl in the head," said Sgt. Eric Gripp with the Philadelphia Police Department.
One neighbor, named Emonhny, says she saw the mother run outside with the child who had just been shot. She called 911.
"No. This is not right, this is not right. That baby is supposed to be here, playing, laughing, eating, having fun, living life," said Emonhy.
Investigators say the shooting appeared to happen in an upstairs bedroom. Neighbors say a good Samaritan pulled over and took the mom and child to Temple University Hospital.
"This could have been prevented," said Emonhy.
Police say the young girl died at the hospital.
"How many times this year have been standing out here and talking about the issue of unsecured firearms and what this can lead to?" asked Gripp.
Sources say the child's grandmother owns the gun. Both grandparents, the child's mom, and another adult relative were home at the time of the shooting, along with a nine-year-old and one-year-old.
"We have a two-year-old whose life is now over because of an unsecured weapon," said Gripp.
Grieving neighbors, who know this family, say they hope someone is held accountable.
"My big message for parents out here: monitor your kids. Please monitor your kids," said Sherrie Richardson.
No one has been charged at this point.
Police are urging any gun owners in the city to secure their firearms. Residents can get free gun locks from the sheriff's office.