In this paper we develop the Aubry-Mather theory for Lagrangians in which the potential energy can be discontinuous. Namely we assume that the Lagrangian is lower semicontinuous in the state variable, piecewise smooth with a (smooth) discontinuity surface, as well as coercive and convex in the velocity. We establish existence of Mather measures, various approximation results, partial regularity of viscosity solutions away from the singularity, invariance by the Euler–Lagrange flow away from the singular set, and further jump conditions that correspond to conservation of energy and tangential momentum across the discontinuity.