A versatile enantioselective total synthesis of barrenazines A and B has been accomplished from 1,4-butanediol. The key steps of the synthesis are a sequential allylboration/ring-closing metathesis for the construction of the tetrahydropyridine ring and the preparation of a functionalized 4-azidopiperidin-5-one through a stereoselective epoxidation and regioselective ring-opening reaction. The C(2)-symmetrical pyrazine skeleton of barrenazines was prepared by dimerization of the azidopiperidinone, and the carbon side chain was completed by copper-catalyzed reactions using Grignard reagents.