Rahquel Carr was sitting in a Mercedes-Benz parked outside her grandparents' home when she was killed Sunday, The Miami Herald reported.
The boy was found holding the weapon after the shooting but police had not determined how the shot was fired.
"We will be looking at who this firearm belonged to, where the firearm was in the vehicle at the time, along with who was present when the gun was fired," said Miami-Dade police detective Roy Rutland.
Under Florida law, firearms inside a vehicle must be securely encased, the Herald reported.
Neighbor Michael Hardaway told the newspaper Rahquel's grandfather, Willie Carr, 57, was transported to a hospital after he collapsed when he learned of the death. Hardaway said there was a group of children playing outside before the shooting.
"Sometimes kids don't know the difference between a real and a fake gun," he said.