A search for a heavy neutral Higgs boson, A, decaying into a Z boson and another heavy Higgs boson, H, is performed using a data sample corresponding to an integrated luminosity of 139 fb- 1 from proton–proton collisions at s=13 TeV recorded by the ATLAS detector at the LHC. The search considers the Z boson decaying into electrons or muons and the H boson into a pair of b-quarks or W bosons. The mass range considered is 230–800 GeV for the A boson and 130–700 GeV for the H boson. The data are in good agreement with the background predicted by the Standard Model, and therefore 95% confidence-level upper limits for σ×B(A→ZH)×B(H→bborH→WW) are set. The upper limits are in the range 0.0062–0.380 pb for the H→ bb channel and in the range 0.023–8.9 pb for the H→ WW channel. An interpretation of the results in the context of two-Higgs-doublet models is also given.