In this paper, we study the role of education as insurance against a bad marriage. Historically, due to disparities in earning power and education across genders, married women often found themselves in an economically vulnerable position, and had to suffer one of two fates in a bad marriage: either they get divorced (assuming it is available) and struggle as low-income single mothers, or they remain trapped in the marriage. In both cases, education can provide a route to emancipation for women. To investigate this idea, we build and estimate an equilibrium search model with education, marriage/divorce/remarriage, and household labor supply decisions. A key feature of the model is that women bear a larger share of the divorce burden, mainly because they are more closely tied to their children relative to men. Our focus on education is motivated by the fact that divorce laws typically allow spouses to keep the future returns from their human capital upon divorce (unlike their physical assets), making education a good insurance against divorce risk. However, as women further their education, the earnings gap between spouses shrinks, leading to more unstable marriages and, in turn, further increasing demand for education. The framework generates powerful amplification mechanisms, which lead to a large rise in divorce rates and a decline in marriage rates (similar to those observed in the US data) from relatively modest exogenous driving forces. Further, in the model, women overtake men in college attainment during the 1990s, a feature of the data that has proved challenging to explain. Our counterfactual experiments indicate that the divorce law reform of the 1970s played an important role in all of these trends, explaining more than one-quarter of college attainment rate of women post-1970s and one-half of the rise in labor supply for married women.