The first mention of self-charging robots, as far as I know, is in the delightfully manic 1960 short story Callahan and the Wheelies by Stephen Barr:

... It turned its photoelectric scanners this way and that, waving its jointed grappling arms about. Then it appeared to make up its mind, and trundled over to a wall socket in the baseboard, plugged itself in and proceeded to recharge itself.
(Read more about the self-charging robot)