The invention discloses a method for synthesizing dialkylhydrogenated noppylbenzyl quaternary ammonium salt compounds and the antibacterial application of such compounds. The invention is obtained by directly synthesizing dialkylhydrogenated noppylamine and benzyl halides in one step Dialkylhydrogenated noppyl benzyl quaternary ammonium salt, in an organic solvent, dialkylhydrogenated noppylamine and benzyl halide (chlorine, bromine, iodine) are fed into a stirring bar and equipped with a certain material ratio respectively Condensate in the Erlenmeyer flask of the reflux device, heat to react, the reaction temperature is controlled at 100-150°C, and the reaction time is controlled at 1-3d. After the reaction, the product is filtered, washed, recrystallized and vacuum-dried to obtain 7 kinds of dialkylhydrogenated notylbenzyl quaternary ammonium compounds respectively, and 7 kinds of dialkylhydrogenated notylbenzyl quaternary ammonium Both Phoma citri and Anthracnose citrus had good inhibitory effect. The invention has rich raw materials, simple operation, mild reaction conditions and simple post-purification treatment. Compared with traditional antibacterial agents, this type of antibacterial compound has the advantages of simple structure, safety and non-toxicity, less environmental pollution, etc., and has a good application prospect.