The invention relates to a traditional Chinese medicine for treating diabetes mellitus and a preparation method thereof. The technical scheme is as follows: the traditional Chinese medicine comprisesthe following raw medical materials: astragali semen, trichosanthes, agrimony, scouring rush, astragalus, rhizoma coptidis, yam, schisandra chinensis, purslane, achyranthes aspera, azolla, salvia, gegen, white peony roots, anemarrhena, fleece-flower roots, gypsum, dodders, buntal, rehmanniae, hen egg yolk, ball cactus and silkworm chrysalis. The preparation method comprises the following steps: taking the raw medical materials by weight portions; grinding and mixing the silkworm chrysalis with the ground hen egg yolk; adding liquor; heating, refluxing, cooling and soaking to prepare medical liquid A; taking the astragalus and the rhizoma coptidis; adding liquor; heating, refluxing, cooling, pulping and soaking to prepare medical liquid B; soaking and pulping the other medical materials inthe liquor; additionally adding liquor to soak and prepare medical liquid C; and mixing the medical liquid A, the medical liquid B and the medical liquid C. The invention has the functions of nourishing yin, clearing heat, activating blood and warming yang, treats both principal and secondary aspects of the disease, not only has favorable treatment effect for the diabetes mellitus, but also has obvious treatment effect on diabetes mellitus complications.