In the automotive industry, improper handling and excessively high temperatures can lead to the failure of lithium-ion batteries. Early failure of lithium batteries can produce trace amounts of gases, such as carbon monoxide (CO) and carbon dioxide (CO2). In this study, hollow spherical nickel oxide (NiO) was prepared using a carbon sphere template method and then combined with Ti3C2Tx (MXene). Most of the NiO hollow spheres had a diameter of about 700 nm. By variation of the ratio of MXene, a carbon monoxide sensor was fabricated, enabling the detection of CO at room temperature. The surface morphology and elemental composition of the materials were analyzed. Experimental and characterization results show that the NiO/MXene composite exhibits faster response/recovery times, higher sensitivity, and better selectivity to CO. The response time of NiO/MXene to 400 ppm of CO is only 8 s, and the recovery time is 16 s. The sensor’s sensitization mechanism was explained through first-principles calculations. This sensor can be applied in lithium battery status monitoring and fault warning systems.