The elliptic flow, de2098a0b323cdcab5" title="Click to view the MathML source">v2den">de">, of muons from heavy-flavour hadron decays at forward rapidity (2.5<y<4den">de">) is measured in Pb–Pb collisions at den">de"> with the ALICE detector at the LHC. The scalar product, two- and four-particle Q cumulants and Lee–Yang zeros methods are used. The dependence of the de2098a0b323cdcab5" title="Click to view the MathML source">v2den">de"> of muons from heavy-flavour hadron decays on the collision centrality, in the range 0–40%, and on transverse momentum, pTden">de">, is studied in the interval 3<pT<10 GeV/cden">de">. A positive de2098a0b323cdcab5" title="Click to view the MathML source">v2den">de"> is observed with the scalar product and two-particle Q cumulants in semi-central collisions (10–20% and 20–40% centrality classes) for the pTden">de"> interval from 3 to about 5 GeV/cden">de"> with a significance larger than 3σ , based on the combination of statistical and systematic uncertainties. The de2098a0b323cdcab5" title="Click to view the MathML source">v2den">de"> magnitude tends to decrease towards more central collisions and with increasing pTden">de">. It becomes compatible with zero in the interval 6<pT<10 GeV/cden">de">. The results are compared to models describing the interaction of heavy quarks and open heavy-flavour hadrons with the high-density medium formed in high-energy heavy-ion collisions.