The exclusive decay of the Higgs boson to a vector meson ($ J/psi $ or $ Upsilon(1S) $) and $ Z $ boson is studied in this work. The decay amplitudes are separated into two parts in a gauge invariant manner. The first part comes from the direct coupling of the Higgs boson to the charm (bottom) quark and the other from the $ HZZ^{*} $ or the loop-induced $ HZgamma^{*} $ vertexes in the standard model. While the branching ratios from the direct channel are much smaller than those of the indirect channel, their interference terms give nontrivial contributions. We further calculate the QCD radiative corrections to both channels, which reduce the total branching ratios by around 20% for both $ J/psi $ and $ Upsilon(1S) $ production. These results may help to check the SM predictions of the $ H cbar{c}(H bbar{b}) $ coupling and to seek for hints of new physics at the High Luminosity LHC or future hadron colliders.