Sgt. Lobpries with BCSO said the incident occurred in the 1700 block of Ruffin Road around 10 p.m.
Officials said the young boy found the weapon sitting on a mantle unsecured.
The gun reportedly belonged to the child's older brother, who BCSO said left it there after cleaning it. Lobpries noted that it is unclear if the older brother forgot it was there.
Officials said the child fired the gun at his head but only suffered a graze wound. He was taken to the Memorial Hermann Children's Hospital for treatment.
Detectives said they are in contact with the district attorney's office as the case is still under investigation.