Cyclitols and sugars were obtained as a mixture from Medicago sativa L., in a comparative study by using maceration, and pressurized liquid extraction, as a modern and green extraction techniques. The influence of extraction parameters including: extraction temperature, time and number of cycles on the content of sugars and cyclitols was investigated based on response surface methodology. The highest total amount of sugars and cyclitols (62.27 ± 2.30 and 50.35 ± 0.77 mg/g of dry material, respectively) was obtained when extraction was performed at 88°C, for 22 min, in two cycles. The methodology used involved extraction, purification, selective separation (using yeast and anion exchange resin) and derivatization, followed by gas chromatography ‐mass spectrometry analysis. The use of yeast treatment realized an effective fractionation of cyclitols and sugars, which allowed the removal of most sugars. The involvement of anion exchange resin after yeast allowed the removal of sugar alcohols and lactose, together with other sugar traces remained and to obtain a solution containing six cyclitols. The recrystallization of dry residue after solvent evaporation, from ethanol, allowed us to obtain 14.65 mg of white pure crystals identified with NMR spectroscopy, liquid chromatography with mass spectrometry, gas chromatography with mass spectrometry, optical rotation and melting point as analysis D‐pinitol.