The invention belongs to the technical field of oil exploitation, and particularly relates to a
foaming agent for
nitrogen foam fracturing and a preparation method and application thereof. The preparation method comprises the following steps: adding 2, 4, 6-trimethyl-3, 5-diaminobenzene
sulfonic acid,
xylene and a catalyst into a high-
pressure reactor, fully stirring, purging a pipeline and a reaction kettle with
nitrogen for 5-10 minutes, vacuumizing, stirring, heating to 70-80 DEG C, stopping vacuumizing, adding epoxypropane, heating to 170-190 DEG C, reacting for 2-10 hours, and cooling the
system to 70-80 DEG C; continuously stirring the
mixed solution, introducing
ethylene oxide, heating to 180-200 DEG C after the
ethylene oxide is completely introduced, continuously reacting, and cooling the
system to
room temperature; and adjusting the pH value to 8-9 with
hydrochloric acid, filtering, and carrying out reduced pressure
distillation to obtain a viscous
solid, namely the
foaming agent product. The
foaming agent has the advantages of large foaming volume and long half-life period.