The traditional synthesis methods of imines are limited by expensive catalysts, harsh reaction conditions, and low atomic efficiency. The one-pot synthesis of imines using nitrobenzene and benzaldehyde is a promising reaction path. Transition metal catalytic transfer hydrogenation offers advantages in terms of safety. It has attracted the attention of industrial production and academia as an alternative to conventional hydrogenation processes. Herein, we report an environmentally friendly Co/g–C 3 N 4 nanocatalyst that uses inexpensive cobalt as the fundamental source of feedstock; formic acid is applied as the hydrogen donor, and the yield of the synthesis method can reach 96% under mild conditions. Besides, the catalyst proved to be stable and efficient despite five successive cycles of testing. Moreover, the excellent catalytic activity was demonstrated to be derived from the Co–N x site based on the mechanistic analysis and characterization. For this work, a pathway will be developed to produce transfer hydrogenation of nitro compounds.