A search for the D0 to pi+ pi- mu+ mu- decay, where the muon pair does not originate from a resonance, is performed using proton-proton collision data corresponding to an integrated luminosity of 1.0 fb-1 recorded by the LHCb experiment at a centre-of-mass energy of 7 TeV. No signal is observed and an upper limit on the relative branching fraction with respect to the resonant decay mode D0 to pi+ pi- phi(to mu+ mu-), under the assumption of a phase-space model, is found to be B(D0 to pi+ pi- mu+ mu-)/B(D0 to pi+ pi- phi(to mu+ mu-)) < 0.96 at the 90% confidence level. The upper limit on the absolute branching fraction is evaluated to be B(D0 to pi+ pi- mu+ mu-) < 5.5 x 10-7 at 90% confidence level. This is the most stringent to date.