This paper presents a search for decays of the Higgs boson with a mass of 125 GeV into a pair of new pseudoscalar particles, , where one -boson decays into a -quark pair and the other into a muon pair. The search uses 139 fb of proton-proton collision data at a center-of-mass energy of TeV recorded between 2015 and 2018 by the ATLAS experiment at the LHC. A narrow dimuon resonance is searched for in the invariant mass spectrum between 16 GeV and 62 GeV. The largest excess of events above the Standard Model backgrounds is observed at a dimuon invariant mass of 52 GeV and corresponds to a local (global) significance of (). Upper limits at 95% confidence level are placed on the branching ratio of the Higgs boson to the final state, , and are in the range , depending on the signal mass hypothesis.