A facile, versatile and stereoselective synthesis of bicyclic polyhydroxylated alkaloids as castanospermine analogues is described. The synthetic route started from methyl pyranosides. The key steps involved a high-yielding expeditious one-pot tandem reaction from alkenes to N-substituted delta-lactams. The delta-lactams were stereoselectively vinylated to give the dienes, which were followed by the ring-closing metathesis to produce the cyclized products. The functional group transformations of the resulting bicyclic compounds furnished diverse polyhydroxylated alkaloids in good yields.