The first study of ϕ-meson production in p–Pb collisions at forward and backward rapidity, at a nucleon–nucleon centre-of-mass energy , has been performed with the ALICE apparatus at the LHC. The ϕ-mesons have been identified in the dimuon decay channel in the transverse momentum () range , both in the p-going () and the Pb-going () directions — where y stands for the rapidity in the nucleon–nucleon centre-of-mass — the integrated luminosity amounting to and , respectively, for the two data samples. Differential cross sections as a function of transverse momentum and rapidity are presented. The forward–backward ratio for ϕ-meson production is measured for , resulting in a ratio ∼0.5 with no significant dependence within the uncertainties. The dependence of the ϕ nuclear modification factor exhibits an enhancement up to a factor 1.6 at in the Pb-going direction. The dependence of the ϕ-meson cross section in pp collisions at , which is used to determine a reference for the p–Pb results, is also presented here for and , for a integrated luminosity sample.