Lichenysin, an amphiphilic biosurfactant with structural and physicochemical properties similar to surfactin, is produced by Bacillus licheniformis. Its low toxicity, good environmental compatibility, solubilization, foaming, emulsification and detergent activities have led to a wide range of applications in agricultural biocontrol, enhanced oil recovery, foaming agents for cosmetics and detergents for household cleaning products. However, despite the extraordinary surface-active properties and potential applications of lichenysin, the number of wild bacteria found so far is relatively low. Low titers and high costs are the main limiting factors for widespread industrial applications. In this study, a factorial design was used to optimize the composition of the medium for the production of lichenysin by Bacillus licheniformis Ali5. Firstly, the solutions of carbon, nitrogen, amino acids, inorganic salts and trace elements in the medium were evaluated in flasks using a single-factor optimization method. Meanwhile, the operating conditions were optimized in the same way. Afterwards, a partial factorial design was used to investigate the effect of six variables (five medium compositions and inoculum size) on lichenysin production. Based on the results obtained, the concentrations of sucrose and ammonium nitrate and the inoculum size were considered to be important for lichenysin production. Subsequently, a full factorial design was used to optimize these three variables. The optimized medium composition were sucrose 19.8 g/L, NH4NO3 3.9 g/L, K2HPO4·3H2O 4.0 g/L, MgSO4·7H2O 0.6 g/L, FeSO4·7H2O 0.1 g/L, CaCl2 0.01 g/L, NaCl 3.0, trace elements 1.2 mL/L. Finally, the titer of lichenysin after fed-batch fermentation reached 1425.85 mg/L, which was approximately 5.5 times higher than the titer of lichenysin from the original medium. Consequently, the method was further demonstrated to be suitable for lichenysin production.