The invention discloses a method for preparing kestose and nystose through yacon. Method of water extraction by alcohol sedimentation is adopted and supernate thereof is taken, concentrated, frozen and dried to obtain faint yellow yacon oligosaccharide. The yacon oligosaccharide is analyzed through high pressure liquid chromatography with a chromatography condition as follows: a chromatographic column is APS-2HYPERSIL, a column temperature is 30 DEG C, a moving phase is acetonitrile-water (75 to 25, V/V), a flow velocity is 0.8ml/min, a sample size is 20 Mul and a differential detector is arranged. The yacon oligosaccharide comprises fructose, glucose, saccharose, kestose, nystose and 1F-Fructofuranosyl nystose with contents respectively as 38,30 percent, 16.44 percent, 14.58 percent, 12.29 percent, 12.17 percent and 6.2 percent. Silicagel column chromatography is implemented on a prepared oligosaccharide sample; glacial acetic acid, chloroform, absolute ethyl alcohol and water with a proportion of 3 to 11 to 11 to 1 are used as an eluant for elution; the eluant is collected in sequence and then is concentrated, frozen and dried to obtain the kestose and nystose. The purity of the kestose and nystose prepared through high pressure liquid chromatography can be more than 90 percent.