We combined deep Chandra, ROSAT HRI, and XMM-Newton observations of M87 to study the impact of active galactic nucleus (AGN) outbursts on its gaseous atmosphere. Many X-ray features appear to be a direct result of repetitive AGN outbursts. In particular, the X-ray cavities around the jet and counterjet are likely due to the expansion of radio plasma, while rings of enhanced emission at 14 and 17 kpc are probably shock fronts associated with outbursts that began 1–2 × 107 yr ago. The effects of these shocks are also seen in brightenings within the prominent X-ray arms. On larger scales, ∼50 kpc from the nucleus, depressions in the surface brightness may be remnants of earlier outbursts. As suggested for the Perseus Cluster by Fabian and his coauthors, our analysis of the energetics of the M87 outbursts argues that shocks may be the most significant channel for AGN energy input into the cooling-flow atmospheres of galaxies, groups, and clusters. For M87, the mean power driving the shock outburst, 2.4 × 1043 ergs s-1, is 3 times greater than the radiative losses from the entire cooling flow. Thus, even in the absence of other energy inputs, outbursts every 3 × 107 yr are sufficient to quench the flow.