The differential cross-section of prompt inclusive production of long-lived charged particles in proton-proton collisions is measured using a data sample recorded by the LHCb experiment at a centre-of-mass energy of ${\sqrt{s} = 13\,\mathrm{TeV}}$. The data sample, collected with an unbiased trigger, corresponds to an integrated luminosity of ${5.4\,\mathrm{nb}^{-1}}$. The differential cross-section is measured as a function of transverse momentum and pseudorapidity in the ranges ${p_\mathrm{T} \in [0.08, 10)\,\mathrm{GeV}\,c^{-1}}$ and ${\eta \in [2.0, 4.8)}$ and is determined separately for positively and negatively charged particles. The results are compared with predictions from various hadronic-interaction models.