The differential cross section for isolated-photon production in pp collisions is measured at a centre-of-mass energy of 13 TeV with the ATLAS detector at the LHC using an integrated luminosity of 36.1 fb. The differential cross section is presented as a function of the photon transverse energy in different regions of photon pseudorapidity. The differential cross section as a function of the absolute value of the photon pseudorapidity is also presented in different regions of photon transverse energy. Next-to-leading-order QCD calculations from Jetphox and Sherpa as well as next-to-next-to-leading-order QCD calculations from Nnlojet are compared with the measurement, using several parameterisations of the proton parton distribution functions. The predictions provide a good description of the data within the experimental and theoretical uncertainties. [Figure not available: see fulltext.]