The invention belongs to the technical field of foaming agents, and particularly relates to a foaming agent for a shield machine. In order to solve the problems that various properties including the uniformity, the stability, the lubricating properties, the permeability and the like of foams of a domestic foaming agent at current cannot completely meet requirements for foams in shield tunneling, and the adaptability of the foaming agent has certain limit, the invention provides the foaming agent for the shield machine, and the foaming agent is prepared from sodium dodecylsulfate, sodium alcohol ether sulphate, sodium alpha-olefin sulfonate, modified polyethoxylated silicone, and water in a certain proportion. According to the foaming agent disclosed by the invention, the working performance of soil is improved, so that the soil forms plastic deformation to provide uniform and controllable support pressure, and a working surface is stable; leakage is reduced, the sealing properties of the working surface are strengthened, internal frictional force is reduced, abrasion of the soil on cutter heads, conveyors and conveyer belts is reduced, and the energy consumption is reduced; the viscosity of a soil mass is reduced, and generation of plugging is avoided; and the foaming agent has the effect of restraining dust during construction of rock and soil tunnels and mines.