A critical challenge for the commercialization of layer-structured nickel-rich lithium transition metal oxide cathodes for battery applications is their capacity and voltage fading, which originate from the disintegration and lattice phase transition of the cathode particles. The general approach of cathode particle surface modification could partially alleviate the degradation associated with surface processes, but it still fails to resolve this critical barrier. Here, we report that infusing the grain boundaries of cathode secondary particles with a solid electrolyte dramatically enhances the capacity retention and voltage stability of the cathode. We find that the solid electrolyte infused in the boundaries not only acts as a fast channel for lithium-ion transport, it also, more importantly, prevents penetration of the liquid electrolyte into the boundaries, and consequently eliminates the detrimental factors, which include cathode–liquid electrolyte interfacial reactions, intergranular cracking and layered-to-spinel phase transformation. This grain-boundary engineering approach provides design ideas for advanced cathodes for batteries.