Using the approach based on conformal symmetry we calculate the two-loop coefficient function for the axial-vector contributions to two-photon processes in the MS scheme. This is the last missing element for the complete next-to-next-to-leading order (NNLO) calculation of the the pion transition form factor γ * γ → π in perturbative QCD. The corresponding high-statistics measurement is planned by the Belle II collaboration and will allow one to put strong constraints on the pion light-cone distribution amplitude. The calculated NNLO corrections prove to be rather large and have to be taken into account. The same coefficient function determines the contribution of the axial-vector generalized parton distributions to deeply-virtual Compton scattering (DVCS) which is investigated at the JLAB 12 GeV accelerator, by COMPASS at CERN, and in the future will be studied at the Electron Ion Collider EIC.