The synthesis of novel polyhydroxylated quinolizidines and azaspiro[4.5]decanes is reported. A key step of this transformation involved an addition of allylmagnesium bromide to an ω-bromonitrile derived from D-xylose followed by an intramolecular displacement of a bromide. The resulting cyclic imine was treated either with allylmagnesium bromide or with NaBH4, to provide 2,2-diallyl- or 2-allylpiperidine, respectively. The desired bicyclic framework was constructed via a ring-closing metathesis reaction. The Ru catalysts were reused in the following syn-dihydroxylation step.