A search for the very rare B∗0→μ+μ− and Bs∗0→μ+μ− decays is conducted by analysing the Bc+→π+μ+μ− process. The analysis uses proton-proton collision data collected with the LHCb detector between 2011 and 2018, corresponding to an integrated luminosity of 9 fb−1 . The signal signatures correspond to simultaneous peaks in the μ+μ− and π+μ+μ− invariant masses. No evidence for an excess of events over background is observed for either signal decay mode. Upper limits at the 90% confidence level are set on the branching fractions relative to that for Bc+→J/ψπ+ decays, RB∗0(μ+μ−)π+/J/ψπ+RBs∗0(μ+μ−)π+/J/ψπ+<3.8×10−5 and <5.0×10−5. R B ∗ 0 ( μ + μ - ) π + / J / ψ π + < 3.8 × 10 - 5 and R B s ∗ 0 ( μ + μ - ) π + / J / ψ π + < 5.0 × 10 - 5 .