Here, we describe an efficient and environmentally friendly synthesis of polycyclic N-heterocycles under electrochemical external oxidant-free conditions. The extent of the sequential electrochemical oxidative aromatization can be regulated with the assistance of redox mediators.