The abundance of the neutron-rich magnesium isotopes observed in metal-poor stars is explained quantitatively with a chemical evolution model of the local Galaxy that considers - for the first time - the metallicity-dependent contribution from intermediate mass stars. Previous models that simulate the variation of Mg isotopic ratios with metallicity in the solar neighbourhood have attributed the production of Mg25 and Mg26 exclusively to hydrostatic burning in massive stars. These models match the data well for [Fe/H]>-1.0 but severely underestimate Mg25/Mg24 and Mg26/Mg24 at lower metallicities. Earlier studies have noted that this discrepancy may indicate a significant role played by intermediate-mass stars. Only recently have detailed calculations of intermediate-mass stellar yields of Mg25 and Mg26 become available with which to test this hypothesis. In an extension of previous work, we present a model that successfully matches the Mg isotopic abundances in nearby Galactic disk stars through the incorporation of nucleosynthesis predictions of Mg isotopic production in asymptotic giant branch stars.