An enantioselective and diastereoselective synthesis of six 5,7-dimethylindolizidine isomers is described via an intramolecular cyclization that involves an allylsilyl nucleophilic group and an acyliminium ion. The first total synthesis of naturally occurring (-)-dendroprimine has been achieved in five steps.