A relatively high critical temperature, Tc, approaching 40 K, places the recently-discovered superconductor magnesium diboride (MgB2) intermediate between the families of low- and copper-oxide-based high-temperature superconductors (HTS). Supercurrent flow in MgB2 is unhindered by grain boundaries, unlike the HTS materials. Thus, long polycrystalline MgB2 conductors may be easier to fabricate, and so could fill a potentially important niche of applications in the 20 to 30 K temperature range. However, one disadvantage of MgB2 is that in bulk material the critical current density, Jc, appears to drop more rapidly with increasing magnetic field than it does in the HTS phases. The magnitude and field dependence of Jc are related to the presence of structural defects that can pin the quantised magnetic vortices that permeate the material, and prevent them from moving under the action of the Lorentz force. Vortex studies suggest that it is the paucity of suitable defects in MgB2 that causes the rapid decay of Jc with field. Here we show that modest levels of atomic disorder, induced by proton irradiation, enhance the pinning, and so increase Jc significantly at high fields. We anticipate that chemical doping or mechanical processing should be capable of generating similar levels of disorder, and so achieve technologically-attractive performance in MgB2 by economically-viable routes.