Pct. 4 deputies responded to the scene at 11:30 a.m. in the 20200 block of Woodsboro Court in north Harris County in reference to an accidental discharge.
Deputies say that the gun was holstered, and somehow the child got hold of the firearm.
Authorities said the off-duty deputy was treated at a hospital and is in stable condition.
According to Pct. 4, the deputy's mother was at home at the time of the shooting.
An investigation is still ongoing.
For more on this story, follow Pooja Lodhia on Facebook,X and Instagram.