The cross-sections of ψ(2S) meson production in proton-proton collisions at s=13TeV are measured with a data sample collected by the LHCb detector corresponding to an integrated luminosity of 275pb−1. The production cross-sections for prompt ψ(2S) mesons and those for ψ(2S) mesons from b-hadron decays (ψ(2S)−from−b) are determined as functions of the transverse momentum, pT, and the rapidity, y, of the ψ(2S) meson in the kinematic range 2<pT<20GeV/c and 2.0<y<4.5. The production cross-sections integrated over this kinematic region are \begin{equation*} \begin{split} \sigma(\mbox{prompt }\psi(2S),13~\mathrm{TeV}) &= {1.430 \pm 0.005(\mathrm{stat}) \pm 0.099 (\mathrm{syst})\mu\mathrm{b}},\\ \sigma(\psi(2S)\mathrm{-from-}b,13~\mathrm{TeV})&={0.426 \pm 0.002(\mathrm{stat}) \pm0.030 (\mathrm{syst})\mu\mathrm{b}}. \end{split} \end{equation*} A new measurement of ψ(2S) production cross-sections in pp collisions at s=7TeV is also performed using data collected in 2011, corresponding to an integrated luminosity of 614pb−1.The integrated production cross-sections in the kinematic range 3.5<pT<14GeV/c and 2.0<y<4.5 are \begin{equation*} \begin{split} \sigma(\mbox{prompt }\psi(2S),7~\mathrm{TeV}) &={0.471 \pm0.001 (\mathrm{stat}) \pm 0.025 (\mathrm{syst})\mu\mathrm{b}},\\ \sigma(\psi(2S)\mathrm{-from-}b,7~\mathrm{TeV}) &={0.126\pm0.001 (\mathrm{stat}) \pm0.008 (\mathrm{syst})\mu\mathrm{b}}. \end{split} \end{equation*} All results show reasonable agreement with theoretical calculations.