In this work, core–shell‐structured CoSe@C and N‐CoSe@C dodecahedra were successfully obtained through the calcination of cobalt‐based metal–organic frameworks (ZIF‐67 as a Co‐based MOF or the N‐containing N‐ZIF‐67). In this approach, the cobalt species in the ZIF‐67 or N‐ZIF‐67 reacted with selenium powder to form CoSe nanoparticles in situ, and the organic species were transformed into carbon materials at temperatures between 700 and 900 °C for 2 h under a nitrogen atmosphere. The as‐synthesized materials were used for the reduction of 4‐nitrophenol (4‐NP) assisted by NaBH4. All of the catalysts could catalyze the reduction of 4‐NP to 4‐AP, and N‐CoSe@C‐800‐4 possessed the highest catalytic activity and could completely convert 4‐NP to 4‐AP in only 40 s at ambient temperature. This catalytic activity may be attributed to the high nitrogen content (4.15 %) of N‐CoSe@C‐800‐4. The morphologies and compositions of the synthesized samples were investigated by SEM, TEM, energy‐dispersive X‐ray spectroscopy (EDX), XRD, X‐ray photoelectron spectroscopy (XPS), and nitrogen adsorption–desorption measurements.