Primary heat exchanger cracks in gas wall-mounted boilers are a serious safety hazard. Therefore, the research objective of this study is to identify the root causes of cracking in the heat exchanger of gas wall-hung boilers and develop an effective and universally applicable failure analysis process. In this study, root cause analysis (RCA) was used to investigate the causes of these cracks. Scanning electron microscopes (SEM), metallographic microscopes (OM), and other equipment were used to investigate the cracking phenomenon. The Fault tree analysis (FTA) and Grey relational analysis (GRA) were used to assist in semi-quantitative analysis. Crevice corrosion was the primary cause of the cracks. Structural defects in the heat exchanger were the main cause of the formation of corrosive crevices. Additionally, defects generated from brazing heat treatment can exacerbate the corrosion and cracking tendency of the heat exchanger tubes. Some suggestions for improvement in multiple aspects such as product design, selection of raw materials, and heat treatment were proposed. These suggestions can help to prevent primary heat exchanger cracks and improve the safety of gas wall-mounted boilers.