A study of the decay D0→K−π+μ+μ− is performed using data collected by the LHCb detector in proton-proton collisions at a centre-of-mass energy of 8 TeV, corresponding to an integrated luminosity of 2.0 fb−1. Decay candidates with muon pairs that have an invariant mass in the range 675--875 MeV/c2 are considered. This region is dominated by the ρ0 and ω resonances. The branching fraction in this range is measured to be (D0→K−π+μ+μ− ) = (4.17±0.12(stat)±0.40(syst))×10−6. This is the first observation of the decay D0→K−π+μ+μ−. Its branching fraction is consistent with the value expected in the Standard Model.