Fire extinguishing agents are an important factor in the fight against fires. In this study, a new composite powder (CSPMS) was synthesized and used to extinguish fires caused by petroleum products. SiO2 nanoparticles, Mg(OH)2 nanoparticles, and nanocomposites of NH4H2PO4/chitosan (CSP) were combined to generate CSPMS powder. The structure and morphology of the material were characterized using methods such as XRD, SEM, FTIR, etc. The results showed that the synthesized Mg(OH)2 nanoparticle size ranged from 20 to 30 nm, and the NH4H2PO4 nanoparticle size ranged from 800 to 900 nm on the chitosan surface. The CSPMS material had particle sizes ranging from 2 to 3 µm, with a uniform distribution of SiO2 nanoparticles (50–100 nm) and Mg(OH)2 nanoparticles on the surface. The powdered materials were applied to extinguish gasoline and oil fires. CSPMS sample demonstrated the best fire extinguishing time and powder consumption (5.8 s and 12.2 g, respectively) and CO emission below the threshold of 400 ppm. Small‐scale fire extinguishing tests showed that CSPMS powder had better fire extinguishing capability, cooling time, and CO gas adsorption ability compared to commercial fire extinguishing powder.