Carbon-incorporated metal nanoparticles are heat-treated in various gas atmospheres to create carbon shells with different porosity. A highly porous carbon shell is formed due to the carbon etching effect by H2, and the defect healing effect by CO is discovered through additional CO gas treatment of the H2/N2 gas-treated sample.