The equipment in a factory will gradually deteriorate during production, leading to the production of defective products. Without appropriate maintenance, the defect rate will increase over time. Consequently, the production cost will rise, the inventory quality will be affected, the profit will decrease, and the risk of carbon emissions will increase, leading to more customer complaints and damaging the corporate image. In addition to focusing on preventive maintenance to ensure the quality of products, companies should also take carbon emissions into consideration. Furthermore, the frequency of maintenance must be carefully considered, as both carbon emissions and maintenance costs will increase if the frequency is too high; conversely, if the maintenance frequency is too low or non-existent, the defect rate may increase cumulatively, or production may be suspended due to equipment failure. Therefore, this research explores preventive maintenance and inventory management issues within an imperfect production system and develops an extended economic production quantity model that incorporates defective products as well as taking carbon tax and preventive maintenance into consideration. The main purpose is to determine the optimal maintenance frequency, production, and replenishment cycle length, so as to maximize the total profit under the carbon tax policy. This study demonstrates a computing process with relatively impractical product data based on the actual business situation of a disposable diaper manufacturer. Furthermore, a sensitivity analysis is implemented to the model parameters in the proposed model. The managemental insights are illustrated based on the results of theoretical analysis to provide a reference to policy makers during decision making, hence, to secure the sustainability and green transitions of corporates. The results of this study not only help to reduce environmental impact but can also improve the competitiveness and sustainable development of enterprises.