For every genus g we define a new stratification of the moduli space of curves M_g in terms of syzygies, having the property that the smallest stratum is the locus of curves lying on a K3 surface while the top stratum is a divisor on the moduli space that provides a counterexample to the Harris-Morrison Slope Conjecture on the cone of effective divisors on M_g. Immediate consequences of this construction are (1) intrinsic characterizations of curves lying on K3 surfaces and (2) a proof that many moduli spaces of pointed curves are of general type.