The energy response of the ATLAS calorimeter is measured for single charged pions with transverse momentum in the range 10 < pT< 300 GeV. The measurement is performed using 139 fb - 1 of LHC proton–proton collision data at s=13 TeV taken in Run 2 by the ATLAS detector. Charged pions originating from τ-lepton decays are used to provide a sample of high-pT isolated particles, where the composition is known, to test an energy regime that has not previously been probed by in situ single-particle measurements. The calorimeter response to single-pions is observed to be overestimated by ∼ 2 % across a large part of the pT spectrum in the central region and underestimated by ∼ 4 % in the endcaps in the ATLAS simulation. The uncertainties in the measurements are ≲ 1 % for 15 < pT< 185 GeV in the central region. To investigate the source of the discrepancies, the width of the distribution of the ratio of calorimeter energy to track momentum, the energies per layer and response in the hadronic calorimeter are also compared between data and simulation.