Captain Keith Barnett says police were called to Chisholm Elementary School around 8:30 Monday morning after school administrators became aware of the situation.
Another student reported to a teacher that the youngster was carrying the weapon, identified as a .38 caliber handgun. The weapon was not loaded according to Barnett.
The Montgomery Police Department investigation shows that the child was riding with his grandmother to school and that an uncle had accidentally left the weapon inside the car over the weekend.
The child picked up the gun and put it in his bag as he headed off for class.
The investigators say they found "no intentions" from the child, and that "The child probably didn't know what he was doing."
State of Alabama law did not allow for the child to be charged and taken to a youth facility. Barnett said the child was "informally" charged with carrying a weapon on a school campus.
The weapon was impounded and the child released back into his parents' custody.
No other charges were expected as investigators believe no one "provided" the child with the weapon.
Though it looks like an accident, Barnett said an investigation will continue.