Electrochemical hydrogenation shows a promising prospect for accomplishing the production of aniline from nitrobenzene. Compared with other transform strategies, electrochemical nitrobenzene reduction possesses both safety and sustainability. In this work, we have developed a protocol that realizes the hydrogenation of nitrobenzene to aniline in a nonaqueous environment. The redox reaction triggers through SEI on the cathode inspired by Li-ion battery technology. This protocol avoids complex and unstable catalyst loading on electrodes and achieves a high selectivity of aniline in cheap undivided cells. Furthermore, the reaction can be extended to the gram scale which is expected to be a practical application. It is believed that further studies will be conducted to realize selective hydrogenation of nitrobenzene derivatives and other organic compounds with complex functional groups for industrial requirements.