The invention provides a vegetable dye for fabrics. The vegetable dye is prepared from, by weight, 15-25 parts of a plant coloring agent, 25-45 parts of dimethyl carbonate, 1-3 parts of urea, 2-5 parts of polyethylene glycol, 0.8-1.5 parts of sodium polyacrylate, 0.5-1 part of cellulose sodium sulfonate, 0.3-0.5 part of diphenylamine, 1.5-3 parts of sodium bicarbonate, 4-9 parts of ethylenediaminetetraacetic acid and 50-90 parts of deionized water. The vegetable dye for the fabrics is also prepared from, by weight, 2-7 parts of an antibacterial agent, wherein the antibacterial agent is chitosan or chitin. The invention further provides a preparation method of the vegetable dye. The method is simple in operation and mild in condition. The vegetable dye for the fabrics has the advantages that a natural plant extract is adopted as the vegetable dye, the vegetable dye is safe, environmentally friendly, easy to degrade, and poisonless and harmless for the human body, through the auxiliaryaction of the polyethylene glycol, the cellulose sodium sulfonate, the diphenylamine, the sodium polyacrylate and the sodium bicarbonate, the color fixing rate is high, the vegetable dye does not falloff easily, and the practical significance is higher.