A search for the lepton-flavour violating decay $D^0 to e^pm mu^mp$ is made with a dataset corresponding to an integrated luminosity of 3.0 fb$^{-1}$ of proton-proton collisions at centre-of-mass energies of $7$ TeV and $8$ TeV, collected by the LHCb experiment. Candidate $D^0$ mesons are selected using the decay $D^{*+} to D^0 pi^+$ and the $D^0 to e^pm mu^mp$ branching fraction is measured using the decay mode $D^0 to K^-pi^+$ as a normalisation channel. No significant excess of $D^0 to e^pm mu^mp$ candidates over the expected background is seen, and a limit is set on the branching fraction, $mathcal{B}(D^0 to e^pm mu^mp) < 1.3 times 10^{-8}$, at 90 % confidence level. This is an order of magnitude lower than the previous limit and it further constrains the parameter space in some leptoquark models and in supersymmetric models with R-parity violation.