The invention belongs to the technical field of a gelling agent for geologic hazard control as well as filling control of goaf and waste laneway or collapse craters after exploitation of other mines, and provides a formula and a method of a novel polymer composite gelling agent for grouting. The gelling agent comprises the following components in percentage by weight: 10-25% of bentonite, 5-20% of cellulose, 5-20% of vegetable gum, 10-15% of calcium hydroxide, 10-25% of inorganic hygroscopic agent, 0.5-1.5% of inorganic dispersant, 0.5-2% of inorganic flocculent, 6-18% of organic flocculent, and 5-15% of alkali metal carbonate. The gelling agent is used for processing and crushing, mixing with water, and injecting to slurry for gelling. According to the invention, the characteristics of high-hydroscopicity mineral matters and hydroscopic synthetic resin are sufficiently absorbed and utilized, and various ion groups are introduced and adjusted to obtain specific performance, so that the gelling agent has strong water solubility, can form hydrophile and water-insoluble gel in the slurry, and has excellent adhesion force to solids and dissolved matters in the slurry, good gelling property, strong water control function, high and adjustable jelling speed, low cost and no pollution.