An electrocatalyst with Cu nanoparticles embedded in a mesoporous carbon was prepared by the soft-template route using a green process. Its particular structure boosts its performance for CO2RR regarding selectivity and charge/mass transfers.