Early winter ozone mixing ratios in the Arctic middle stratosphere show an interannual variability of about 10%. We show that ozone variability in early January is caused by dynamical processes during Arctic polar vortex formation in autumn (September to December). Observational data from satellites and ozone sondes are used in conjunction with simulations of the chemistry and transport model ATLAS to examine the relationship between the meridional and vertical origin of air enclosed in the polar vortex and its ozone amount. For this, we use a set of artificial model tracers to deduce the origin of the air masses in the vortex in January in latitude and altitude in September. High vortex mean ozone mixing ratios are correlated with a high fraction of air from low latitudes enclosed in the vortex and a high fraction of air that experienced small net subsidence (in a Lagrangian sense). As a measure for the strength of the Brewer-Dobson circulation and meridional mixing in autumn, we use the Eliassen-Palm flux through the mid-latitude tropopause averaged from September to November. In the lower stratosphere, this quantity correlates well with the origin of air enclosed in the vortex and reasonably well with the ozone amount in early winter.