Authorities responded to reports of a possible child injury in the 11300 block of Rancho Bella Parkway around 10:00 a.m.
The Fort Bend County Sheriff's Office says CPR was performed on the child and he was revived, but his pulse remained weak.
The boy was transported to the hospital and is now breathing on his own.
Sheriff Troy Nehls says deputies are now working to determine why the electrical box was live when the child stepped on it.
UPDATE from @SheriffTNehls: 7yo boy is breathing on his own! Deputies/ electricians out here trying to figure out why electric box was live when boy stepped on it. Not weather related. #abc13 https://t.co/QU9LkU9p7k— Courtney Fischer (@CourtneyABC13) June 19, 2018