The invention provides a preparation method of a bacitracin impurity L based on photocatalysis. The preparation method comprises the following steps: S1, dissolving a bacitracin raw material medicament in a solvent, and performing illuminating at 50-60 DEG C for 1-3h to obtain a crude product containing the bacitracin impurity L; and S2, separating the bacitracin impurity L from other components by adopting a preparation liquid phase, collecting a peak fraction of the bacitracin impurity L, and evaporating the collected peak fraction of the bacitracin impurity L to dryness to obtain a reference product of the bacitracin impurity L. According to the technical scheme of the invention, a photocatalytic chemical conversion method is adopted to convert bacitracin A into an epimer of the bacitracin A, namely an impurity L, under action of illumination, so that the steps are simple and convenient, efficiency is high, low-cost enrichment of an impurity crude product is realized, post-treatmentis simple, cost is low, and pollution is small.