We explored the electrochemical behaviour of an iron-nitrogen-carbon catalyst in the electrochemical CO2 reduction reaction (CO2RR). The catalyst was prepared by pyrolysis from carbon-supported iron porphyrin to ensure a high concentration of FeN4 moieties and low amount of side phases. In situ X-ray absorption spectroscopy and X-ray emission spectroscopy were applied to determine average oxidation state, average spin state for the ex situ catalyst, electrode and various potential conditions. Nuclear forward scattering enabled us to determine the hyperfine interaction parameters associated with all individual iron coordination sites for different potentials as well as ex situ. Together with DFT calculations, this approach enabled us to discriminate the contributions of pyridinic and pyrrolic FeN4 moieties in the catalyst. Control experiments (without CO2 saturation) showed the formation of a pyrrolic ferryl FeN4 moiety with an oxygen ligand, caused by the unavoidable presence of oxygen from air. This intermediate belongs to the oxygen reduction reaction cycle that we elucidated in our previous work (doi: 10.1021/jacs.2c04865). In the presence of CO2, however, the main changes are associated with pyridinic FeN4 moieties. Aided by the identification of different intermediates, we deduce a CO2RR mechanism for the relevant pyridinic FeN4 moieties.