The invention discloses an extraction method of a microbial 
pigment and a method for 
dyeing lyocell fibers by using the same. The extraction method of the microbial 
pigment comprises the following steps: inoculating 
bacteria into a seed culture solution, culturing on a shaking table, inoculating the bacterium seed solution into a 
fermentation culture solution, culturing on the shaking table; afterthe 
fermentation is finished, centrifuging the 
fermentation solution, extracting the centrifugal product by using 
ethyl acetate; and finally, concentrating and 
drying the extract to obtain the microbial 
pigment powder. When the pigment is used for 
dyeing the 
lyocell fibers; 
lyocell fibers are added into a water solution containing the microbial pigment at the 
room temperature; 
dyeing is carried out for 20 to 40 minutes, the bath ratio is 1: (20-30), then 
alum is added, the temperature is raised to 80 DEG C, then 
triethanolamine is added, the temperature is maintained for dyeing for 20-40 minutes, finally a color fixing agent is added, cooling is conducted after the color fixing treatment is finished, and the fibers are taken out, washed with cold water, soaped, washed with water, and dried to obtain dyed lyocell fibers. The dyeing of the microbial pigment on the surface of the lyocell fibers is realized.