An anionic 8π electrocyclic reaction of 4-(diethoxyphosphoryl)-1,3,6-heptatriene derivatives was developed. Under the influence of a base, the substrate underwent deprotonation at the C5 position followed by the 8π electrocyclization of the resulting heptatrienyl anion. The subsequent Horner–Wadsworth–Emmons reaction in one pot, following the addition of an aldehyde, resulted in the production of the