The invention discloses a method for treating liquefiable sandy soil foundations by using microbial bubbles, mainly targeting at liquefiable sandy soil layers, using liquid injection nozzles, hollow drill pipes, connectors, catheters, compressors, bacterial liquid storage tanks, etc. The device injects pre-enriched and cultured denitrifying bacteria liquid into the soil to replace pore water, and the bacteria perform denitrification in the pores to produce inert gases nitrogen and carbon dioxide. The nitrogen produced by biological metabolism in the pores can effectively reduce the soil saturation, increase the shear strength of the soil, and improve the soil's ability to resist liquefaction. Nitrogen dioxide produced by biological metabolism can induce the precipitation of calcium ions in the bacterial fluid to form calcite. Calcite has strong cementing properties, which can effectively improve the cohesion between soil particles, increase the shear strength, and can fill the pores of the soil, increase the compactness of the soil, and further improve its ability to resist liquefaction.