Purpose This paper aims to integrate zero defect manufacturing (ZDM) with process mining (PM) to avoid defect occurrence during production and improve sustainability. Design/methodology/approach The method is developed based on literature review in ZDM and PM. It uses PM for process discovery as an initial strategy in priority to predict-prevent strategies of ZDM. Findings It presents the applicability of the proposed approach in observing manufacturing process behavior, identifying dynamic causes of defects during production, predicting the time of defect occurrence and preventing defective products. It also identifies, explains and measures criteria for environmental, social and economic pillars of sustainability affected by defects and presents the impacts of the proposed approach on sustainability improvement. Originality/value The extended view of this research, as well as its analytical approach, helps practitioners to develop their ZDM and PM approaches more holistically. The practical application of this research is illustrated through implementing it in a real-life manufacturing case, where the outcomes prove its applicability in avoiding defect occurrence and improving all three pillars of sustainability.