The highly complicated nature of far from equilibrium systems can lead to a complete breakdown of the physical intuition developed in equilibrium. A famous example of this is the Mpemba effect, which states that nonequilibrium states may relax faster when they are further from equilibrium or, put another way, hot water can freeze faster than warm water. Despite possessing a storied history, the precise criteria and mechanisms underpinning this phenomenon are still not known. Here, we study a quantum version of the Mpemba effect that takes place in closed many-body systems with a U(1) conserved charge: in certain cases a more asymmetric initial configuration relaxes and restores the symmetry faster than a more symmetric one. In contrast to the classical case, we establish the criteria for this to occur in arbitrary integrable quantum systems using the recently introduced entanglement asymmetry. We describe the quantum Mpemba effect in such systems and relate the properties of the initial state, specifically its charge fluctuations, to the criteria for its occurrence. These criteria are expounded using exact analytic and numerical techniques in several examples, a free fermion model, the Rule 54 cellular automaton, and the Lieb-Liniger model.