A search for the lepton-flavour violating decays B s 0 → e±μ∓ and B0 → e±μ∓ is performed based on a sample of proton-proton collision data corresponding to an integrated luminosity of 3 fb−1, collected with the LHCb experiment at centre-of-mass energies of 7 and 8 TeV. The observed yields are consistent with the background-only hypothesis. Upper limits on the branching fraction of the B s 0 → e±μ∓ decays are evaluated both in the hypotheses of an amplitude completely dominated by the heavy eigenstate and by the light eigenstate. The results are @@B(B0s→e±μ∓)<6.3(5.4)×10−9 and @@B(B0s→e±μ∓)<7.2(6.0)×10−9 at 95% (90%) confidence level, respectively. The upper limit on the branching fraction of the B0 → e±μ∓ decay is also evaluated, obtaining @@B(B0→e±μ∓)<1.3(1.0)×10−9 at 95% (90%) confidence level. These are the strongest limits on these decays to date.