We examined whether attachment security moderates influences of two gender identity variables—felt gender typicality and felt pressure for gender differentiation—on preadolescents' well‐being. We tested two hypotheses. The first was that attachment security protects children from the distress that can stem from feeling gender atypical or from feeling pressure for gender conformity. The second was that secure children derive well‐being from believing they are similar to same‐gender peers whereas insecure children derive well‐being from believing it important to be different from other‐gender peers. We assessed children's attachment security, gender identity, and well‐being (self‐esteem, internalizing problems) in two successive years (N = 211, M initial age = 10.1 years). Results supported the second hypothesis. Attachment security may govern children's contingencies of well‐being.