On these bases, we report here a novel heterojunction for nitrogen photofixation based on the vacancy-ordered Cs2SnBr6 perovskite and g-C3N4 nanosheets showing efficient green ammonia production rates (up to  270 μmol g -1 h -1 ) and where the perovskite, thanks to its peculiar crystal and electronic structure, can actively participate in the photofixation reaction. Through a combined experimental and computational work, we were able to provide a detailed picture of the mechanism underpinning the efficient nitrogen reduction reaction to ammonia observed in this system that can be used to further expand this novel applicative field of photoactive perovskites.