The first stereoselective synthesis of (2 S,3 R,6 S)-6-methyl-3-hydroxy-piperidine-2-carboxylic acid (−)- 6 and (2 R,3 R,6 S)-6-methyl-(2-hydroxymethyl)-piperidine-3-ol (+)- 7 was achieved starting from readily available d-glucose in 14 steps with 17% overall yield for both the compounds. The key feature of the present strategy includes the Wittig-olefination for the preparation of required conjugated keto-azide 9 and construction of 2,3,6-trisubstituted piperidine skeleton 11 by applying intramolecular reductive cyclization of conjugated keto-azide intermediate. The glycosidase inhibitory activity of compounds 6 and 7 towards several glycosidases has been evaluated.