Due to its biofunctions similar to NO, the CO gas signaling molecule has gradually shown great potential in cardiovascular biomaterials for regulating the in vivo performances after the implantation and has received increasing attention. To construct a bioactive surface with CO-releasing properties on the surface of magnesium-based alloy to augment the anticorrosion and biocompatibility, graphene oxide (GO) was firstly modified using carboxymethyl chitosan (CS), and then CO-releasing molecules (CORM401) were introduced to synthesize a novel biocompatible nanomaterial (GOCS-CO) that can release CO in the physiological environments. The GOCS-CO was further immobilized on the magnesium alloy surface modified by polydopamine coating with Zn2+ (PDA/Zn) to create a bioactive surface capable of releasing CO in the physiological environment. The outcomes showed that the CO-releasing coating can not only significantly enhance the anticorrosion and abate the corrosion degradation rate of the magnesium alloy in a simulated physiological environment, but also endow it with good hydrophilicity and a certain ability to adsorb albumin selectively. Owing to the significant enhancement of anticorrosion and hydrophilicity, coupled with the bioactivity of GOCS, the modified sample not only showed excellent ability to prevent platelet adhesion and activation and reduce hemolysis rate but also can promote endothelial cell (EC) adhesion, proliferation as well as the expression of nitric oxide (NO) and vascular endothelial growth factor (VEGF). In the case of CO release, the hemocompatibility and EC growth behaviors were further significantly improved, suggesting that CO molecules released from the surface can significantly improve the hemocompatibility and EC growth. Consequently, the present study provides a novel surface modification method that can simultaneously augment the anticorrosion and biocompatibility of magnesium-based alloys, which will strongly promote the research and application of CO-releasing bioactive coatings for surface functionalization of cardiovascular biomaterials and devices.