We present a mechanical theory of phase coexistence broadly applicable to nonequilibrium and equilibrium systems. Our approach is motivated by ideas developed nearly a half-century ago to study the behavior of inhomogeneous classical fluids. We demonstrate the utility of our method by applying it to the important problem of motility-induced phase separation (MIPS) of active Brownian particles. In addition to quantitatively determining the phase diagram of the MIPS in two and three dimensions, our theory predicts previously unreported anomalous interfacial phenomena, which we confirm by computer simulations. The self-consistent determination of bulk and interfacial phase behavior offered by this mechanical perspective provides a concrete path towards a general theory for nonequilibrium phase transitions.