The nucleation and growth of Ti2AlN thin films on MgO(111) substrates during dual direct current reactive magnetron cosputtering from Ti and Al targets in an Ar/N2 atmosphere at a substrate temperature of 690 °C have been investigated. Time and thickness dependent in situ specular x-ray reflectivity and x-ray diffraction in combination with cross-sectional transmission electron microscopy and Rutherford backscattering spectroscopy reveal the formation of competing phases for slight N superstoichiometry with respect to Ti2AlN. The stoichiometry deviations initiate the layer-by-layer growth of a ∼380 Å thick epitaxial N-substoichiometric cubic (Ti1-xAlx)Ny layer. N-vacancy driven diffusion of Ti and Al leads to decomposition of this metastable solid solution into nanosized cubic TiNy′ and AlNy″ domains as well as to a solid-state reaction with the MgO(111) by formation of a Mg2(Al:Ti)O4 spinel, reducing the transformed (Ti1-xAlx)Ny layer thickness down to ∼60 Å. Local AlNy″ domains serve as templates for Ti2AlN nucleation at higher thicknesses. At the same time TiNy′ and AlNy″ serve as a sink for excess gas phase N during the subsequent polycrystalline Ti2AlN growth with random (Ti1-xAlx)Ny renucleation as a tissue phase along Ti2AlN grain boundaries. The individual Ti2AlN grains with vertical sizes up to the total thickness retain local epitaxy to the substrate, with basal planes nonparallel to the substrate interface. Concurrently the (Ti1-xAlx)Ny layer is further reduced by inward Ti2AlN grain growth along the basal planes.