The electron is predicted to be slightly aspheric1, with a distortion characterized by the electric dipole moment (EDM), de. No experiment has ever detected this deviation. The standard model of particle physics predicts that de is far too small to detect2, being some eleven orders of magnitude smaller than the current experimental sensitivity. However, many extensions to the standard model naturally predict much larger values of de that should be detectable3. This makes the search for the electron EDM a powerful way to search for new physics and constrain the possible extensions. In particular, the popular idea that new supersymmetric particles may exist at masses of a few hundred GeV/c2 (where c is the speed of light) is difficult to reconcile with the absence of an electron EDM at the present limit of sensitivity2, 4. The size of the EDM is also intimately related to the question of why the Universe has so little antimatter. If the reason is that some undiscovered particle interaction5 breaks the symmetry between matter and antimatter, this should result in a measurable EDM in most models of particle physics2. Here we use cold polar molecules to measure the electron EDM at the highest level of precision reported so far, providing a constraint on any possible new interactions. We obtain de = (−2.4 ± 5.7stat ± 1.5syst) × 10−28e cm, where e is the charge on the electron, which sets a new upper limit of |de| < 10.5 × 10−28e cm with 90 per cent confidence. This result, consistent with zero, indicates that the electron is spherical at this improved level of precision. Our measurement of atto-electronvolt energy shifts in a molecule probes new physics at the tera-electronvolt energy scale2.