During thermal runaway (TR), lithium-ion batteries (LIBs) produce a large amount of gas, which can cause unimaginable disasters in electric vehicles and electrochemical energy storage systems when the batteries fail and subsequently combust or explode. Therefore, to systematically analyze the post-thermal runaway characteristics of commonly used LIBs with LiFePO4 (LFP) and LiNixCoyMnzO2 (NCM) cathode materials and to maximize the in situ gas generation during battery thermal runaway, we designed experiments using an adiabatic explosion chamber (AEC) under an inert atmosphere to test LIBs. Additionally, we conducted in situ analysis of the gas components produced during thermal runaway. Our research findings indicate that after thermal runaway, NCM batteries produce more gas than LFP batteries. Based on battery gas production, the degree of harm caused by TR can be ranked as follows: NCM9 0.5 0.5 > NCM811 > NCM622 > NCM523 > LFP. The primary gas components during thermal runaway for both NCM and LFP batteries include H2,CO,CO2,C2H4, and CH4. The gas produced by LFP batteries contains a high proportion of H2. The high concentration of H2 results in a lower flammability limit (LFL) for the gas generated by LFP batteries during TR compared to the mixed gas produced by NCM batteries. Therefore, in terms of battery TR gas composition, the order of hazard level is LFP > NCM811 > NCM622 > NCM523 > NCM9 0.5 0.5 0.5. Although experimental results show that LFP batteries have superior thermal stability and lower gas production during large-scale battery thermal runaway events, considering gas generation composition and thermal runaway products, the thermal runaway risk of LFP batteries may be higher than that of NCM batteries. Although LFP batteries are considered very safe, our research results have once again drawn researchers’ attention to LFP batteries. These gases can also serve as detection signals for battery thermal runaway warnings, providing a cautionary note for the future development of electrochemical energy storage and the renewable energy sector.