The invention provides a method for extracting and purifying cordycepin from cordyceps millitaris mycoderma. The method comprises the steps that the cordyceps millitaris mycoderma is taken as raw materials and smashed through a smashing machine, screened and put in a vacuum drying box to be dried for standby use; a mixed solution of methyl alcohol and water is added in the dried cordyceps millitaris mycoderma powder for steeping; steeped suspension is arranged in a backflow device, backflow is heated and filtered, and an extraction solution is obtained; the extraction solution is extracted through petroleum ether, and a petroleum ether layer is abandoned; the lower remaining solution is decompressed and concentrated to recycle a solvent, and extract of the extraction solution is obtained; after the extract is dissolved through the methyl alcohol, elution is carried out through a silicon gel chromatography column, chloroform and the methyl alcohol are in flowing phases, eluent is recycled, and TLC tracking detection is carried out; the obtained eluent with the cordycepin is decompressed and concentrated, and then is heated through proper methyl alcohol or ethyl alcohol to be dissolved, and low-temperature crystallization is carried out. The technology is easy and controllable, the extraction time is short, the consumption of the organic solvent is little, the organic solvent can be recycled, cost is low, and the obtained cordycepin is high in purity.