The invention provides a method for dyeing bamboo fiber by use of sweet potato leaves, and relates to the field of plant dyes. The method comprises the following steps: smashing the sweet potato leaves, and then adding in 0.5 mol/L of disodium hydrogen phosphate solution, wherein the mass ratio of the sweet potato leaves to the disodium hydrogen phosphate solution is 1:45, continuously warming to 45 DEG C in the stirring process, keeping the temperature for 35min, filtering to obtain filtrate A and filter residue A; adding the filter residue in 0.4mol/L of disodium hydrogen phosphate solution, continuously warming to 50 DEG C in the stirring process, keeping temperature for 40min, filtering to obtain the filtrate B; combining the filtrate A and the filtrate B, regulating pH value to 5.5; putting the wetted bamboo fiber into the mixed solution to dye, taking out, and then centrifuging to remove the redundant mixed solution on the surface of the bamboo fiber, naturally air-drying to obtain the product. The natural pigments taking the green pigment and the black pigment as the majority are extracted from the sweet potato leaves, more coloring materials are extracted from the plant by use of the disodium hydrogen phosphate solution, the prepared dye is good in dyeing effect on the bamboo fiber and hard to fade; the dyeing method is simple, safe and environment-friendly.