In the paper, five quaternary ammonium salts derived from rosin were synthesized, characterized and their antifungal activities against different molds were studied. Choline quaternary ammonium salt and tetramethylammonium hydroxide were synthesized from dehydroabietic acid and the rosin ethanolamine ester quaternary ammonium salts which are new compounds were synthesized from propylene pimaric acid. Their structures were confirmed by FTIR, 1HNMR, 13CNMR, and high resolution mass spectrometry. The antifungal activities of the synthesized quaternary ammonium salts from rosin acid were tested by Oxford cup method, and their minimum inhibitory concentration was determined. The results show that quaternary ammonium salts derived from rosin acid have inhibitory effects on bamboo slices to some extent. Among them, propylene pimaric acid ethanolamine ester quaternary ammonium salts (A 1 and A 2) showed obvious antifungal activity in the Oxford cup test. The Oxford cup activity test and anti-mildew effect of quaternary ammonium salts (B 1 and B 2) synthesized from rosin acid are significant, and there are almost no mould growth on bamboo slices. It can be inferred that A 1, A 2, B 1 and B 2 are expected to be used as bamboo mildew inhibitors. Graphical abstract: Five quaternary ammonium salts derived from rosin were synthesized and characterized; and their antifungal activities against different molds were studied. [Figure not available: see fulltext.].