Pitaya canker, caused byNeoscytalidium dimidiatum, is one of the most important fungal diseases that cause significant losses in production. To replace chemical pesticides, the use of biocontrol strains to manage plant diseases has been the focus of research. In this study, the bacterial strain AF01, identified asPaenibacillus polymyxa, exhibited significant antifungal effects againstN. dimidiatumand four other pitaya fungal pathogens. The strainP. polymyxaAF01 produces 13 fusaricidins, which directly inhibit mycelial growth, spore germination and germ tube elongation by causing the membrane integrity and cell ultrastructure to incur irreversible damage. Pot experiment and yield test confirmed that AF01 provided preservative effects by reducing the disease index. In comparison to the untreated control groups, RNA-seq data showed thatP. polymyxaAF01 selectively blocked some transcription and translation processes and inhibited RNA and DNA structural dynamics, energy production and conversion, and signal transduction, particularly cell wall biosynthesis, changes in membrane permeability, and impairment of protein biosynthesis. Thus,P. polymyxaAF01 could be potentially useful as a suitable biocontrol agent for pitaya canker.