Streptomyces alfalfae XN-04 has been reported for the production of antifungal metabolites effectively to control Fusarium wilt of cotton, caused by Fusarium oxysporum f. sp. vasinfectum (Fov). In this study, we used integrated statistical experimental design methods to investigate the optimized liquid fermentation medium components of XN-04, which can significantly increase the antifungal activity and biomass of XN-04. Seven variables, including soluble starch, KNO3, soybean cake powder, K2HPO4, MgSO4·7H2O, CaCO3 and FeSO4·7H2O, were identified as the best ingredients based on one-factor-at-a-time (OFAT) method. The results of Plackett–Burman Design (PBD) showed that soluble starch, soybean cake powder and K2HPO4 were the most significant variables among the seven variables. The steepest climbing experiment and response surface methodology (RSM) were performed to determine the interactions among these three variables and fine-tune the concentrations. The optimal compositions of medium were as follows: soluble starch (26.26 g/L), KNO3 (1.00 g/L), soybean cake powder (23.54 g/L), K2HPO4 (0.27 g/L), MgSO4·7H2O (0.50 g/L), CaCO3 (1.00 g/L) and FeSO4·7H2O (0.10 g/L). A verification experiment was then carried out under the optimized conditions, and the results revealed the mycelial dry weight of S. alfalfae XN-04 reaching 6.61 g/L. Compared with the initial medium, a 7.47-fold increase in the biomass was achieved using the optimized medium. Moreover, the active ingredient was purified from the methanol extract of S. alfalfae XN-04 mycelium and then identified as roflamycoin (a polyene macrolide antibiotic). The results may provide new insights into the development of S. alfalfae XN-04 fermentation process and the control of the Fusarium wilt of cotton and other plant diseases.