As an emerging technology, additive manufacturing (AM) is able to fabricate products with complex geometries using various materials. In particular, cyber-enabled AM systems have recently become widely applied in many real-world applications. It significantly improves the flexibility and productivity of AM but poses the system under high risks of cyber-physical attacks. For example, cyber-physical attack could maliciously tamper the product design and process parameters, which, in turn, leads to significant alteration of the desired properties in AM products. Therefore, there is an urgent need in incorporating advanced technologies to improve the cyber-physical security for the cyber-enabled AM systems. In this study, two common types of cyber-physical attacks regarding the G-code security were investigated, namely, unintended design modifications and intellectual property theft. To effectively secure the G-code against these two attacks, a new methodology is developed in this study, which consists of a novel blockchain-based data storage approach and an effective asymmetry encryption technique. The proposed method was also applied to a real-world AM case for ensuring the cyber-physical security of the face shield fabrication, which is critical during the COVID-19 pandemic. Based on the proposed methodology, malicious tampering can be accurately detected in time, and meanwhile, the risk of unauthorized access of the G-code file is greatly eliminated as well.