A search for exotic decays of the Higgs boson into a pair of spin-zero particles, H → aa, where the a-boson decay sin to b-quarks promptly or with a mean proper lifetime cτa up to 6 mm and has a mass in the range of 20–60 GeV, is presented. The search is performed in events where the Higgs boson is produced in association with a W or Z boson, giving rise to a signature of one or two charged leptons (electrons or muons) and multiple jets from b-quark decays. The analysis is based on the dataset of proton-proton collisions at √s=13 TeV recorded in 2015 and 2016 by the ATLAS detector at the CERN Large Hadron Collider, corresponding to an integrated luminosity of 36.1 fb−1. No significant excess of events above the Standard Model background prediction is observed, and 95% confidence-level upper limits are derived for the production cross-sections for pp → WH, ZH and their combination, times the branching ratio of the decay chain H → aa → 4b. For a-bosons which decay promptly, the upper limit on the combination of cross-sections for WH and ZH times the branching ratio of H → aa → 4b ranges from 3.0 pb for ma = 20 GeV to 1.3 pb for ma = 60 GeV, assuming that the ratio of WH to ZH cross-sections follows the Standard Model prediction. For a-bosons with longer proper lifetimes, the most stringent limits are 1.8 pb and 0.68 pb, respectively, at cτa ∼ 0.4 mm.