Contamination by ochratoxigenic fungi and its prevention during the pile-fermentation of post-fermented tea have always been a concern. The present study aimed to elucidate the anti-fungal effect and mechanism of polypeptides produced by B. brevis DTM05 (isolated from post-fermented tea) on ochratoxigenic fungi, and to to evaluate their use in the pile-fermentation process of post-fermented tea. The results showed that polypeptides (produced by B. brevis DTM05) with a strong antifungal effect against A. carbonarius H9 mainly had a molecular weight between 3 and 5 kDa. The Fourier-transform infrared spectra of this polypeptide extract showed that it was a mixture consisting mainly of polypeptides and small amounts of lipids and other carbohydrates. The polypeptide extracts significantly inhibited the growth of A. carbonarius H9, and its minimum inhibitory concentration (MIC) was 1.6 mg/L, which significantly reduced the survival rate of spores. The polypeptides also effectively controlled the occurrence and ochratoxin A (OTA) production of A. carbonarius H9 on the tea matrix. The lowest concentration of polypeptides that significantly inhibited the growth of A. carbonarius H9 on the tea matrix was 3.2 mg/L. The enhancement of the fluorescence staining signal in the mycelium and conidiospore showed that the polypeptides with a concentration of more than 1.6 mg/L increased the permeability of the mycelium membrane and conidial membrane of A. carbonarius H9. The significant increase in the extracellular conductivity of mycelia suggested the outward leakage of intracellular active substances, and also further indicated an increase in cell membrane permeability. Polypeptides with a concentration of 6.4 mg/L significantly down-regulated the expression level of the polyketide synthase gene related to OTA production (acpks) in A. carbonarius H9, which may be the fundamental reason why polypeptides affect OTA production. In conclusion, reasonable use of the polypeptides produced by B. brevis can destroy the structural integrity of the cell membrane, make the intracellular active substances leak outward, accelerate the death of fungal cells and down-regulate the expression level of the polyketide synthase gene in A. carbonarius; thus, they can effectively control the contamination of ochratoxigenic fungi and OTA production during the pile-fermentation of the post-fermented tea.