With the discovery of high-temperature superconductivity, it seemed that the vision of superconducting power cables operating at the boiling point of liquid nitrogen (77 K) was close to realization. But it was soon found that the critical current density Jc of the supercurrents that can pass through these polycrystalline materials without destroying superconductivity is remarkably small. In many materials, Jc is suppressed at grain boundaries, by phenomena such as interface charging and bending of the electronic band structure. Partial replacement (‘doping’) of the yttrium in YBa2Cu3O7-δ with calcium has been used to increase grain-boundary Jc values substantially, but only at temperatures much lower than 77 K (ref. 9). Here we show that preferentially overdoping the grain boundaries, relative to the grains themselves, yields values of Jc at 77 K that far exceed previously published values. Our results indicate that grain-boundary doping is a viable approach for producing a practical, cost-effective superconducting power cable operating at liquid-nitrogen temperatures.