The dynamic evolution of a core–shell catalyst (M@C) is revealed via computations and experiments, showing that metal atoms diffuse to form M–N–C sites, which are highly active and capable of regenerating for oxygen reduction and evolution reactions.