The utilization and selectivity of single atoms have garnered significant attention among researchers. However, they are easy to agglomerate because of their high surface energy. To overcome this challenge, it is crucial to seek suitable carriers to anchor single metal atoms to achieve optimal performance. In this work, the structures of transition metal single atoms embedded in hexagonal boron nitride (MB 2 N 2 , M = Fe, Co, Ni, Cu, Zn) are constructed and used for the adsorption and sensing of lithium battery thermal runaway gases (H 2 , CO, CO 2 , CH 4 ) through the DFT method. The adsorption behavior of MB 2 N 2 was evaluated through the adsorption energy, sensitivity, and recovery time. The calculation results indicate that CoB 2 N 2 exhibits strong adsorption capacity for both H 2 and CO. The sensitivity of FeB 2 N 2 toward CO is as high as 3.232 × 10 16 . Subsequently, the adsorption mechanism was studied through TDOS and PDOS, and the results showed that hybridization between orbitals enhanced the gas adsorption performance. This study presents novel approaches for designing single-atom carriers and developing MB 2 N 2 sensors for detecting lithium battery thermal runaway gases.