Inclusive ϒ(1S) and ϒ(2S) production have been measured in Pb–Pb collisions at the centre-of-mass energy per nucleon–nucleon pair sNN=5.02 TeV, using the ALICE detector at the CERN LHC. The ϒ mesons are reconstructed in the centre-of-mass rapidity interval 2.5<y<4 and in the transverse-momentum range pT<15 GeV/c, via their decays to muon pairs. In this Letter, we present results on the inclusive ϒ(1S) nuclear modification factor RAA as a function of collision centrality, transverse momentum and rapidity. The ϒ(1S) and ϒ(2S) RAA, integrated over the centrality range 0–90%, are 0.37±0.02(stat)±0.03(syst) and 0.10±0.04(stat)±0.02(syst), respectively, leading to a ratio RAAϒ(2S)/RAAϒ(1S) of 0.28±0.12(stat)±0.06(syst). The observed ϒ(1S) suppression increases with the centrality of the collision and no significant variation is observed as a function of transverse momentum and rapidity.