This paper studies the dynamic interplay between marriage as a formal institution and gender roles as an informal institution. I find that marriage hammers out conservative gender role attitudes for women but not for men. Identifying the causality is challenging, because conservative gender role attitudes affect the decision to marry early. To address this reverse causality concern, I employ the Compulsory Schooling Law in 1986 in China as an instrumental variable, which provides exogenous variation in the decision of marriage for both men and women. By exploring heterogeneous variation in the schooling channel on marriage, I identify the causal relationship between exposure to marriage and gender role attitudes. I further examine the effects of years of schooling on non-gender-related attitudes such as trust and misanthropy for married women, and on gender attitudes for single women, ruling out the direct nurturing effect of schooling on attitudes. Studying the causal mechanisms at play, I find that both horizontal and oblique social learning and self-deception are behind the evolving pattern of gender role attitudes for men and women. These two mechanisms respond to the long-lasting challenge of endogeneity of gender norms to welfare economics.