Research has demonstrated associations between adolescent sexual behavior and depressive symptoms, but no single study has examined individuals at different ages throughout adolescence and young adulthood in order to determine at what ages sexual behavior may be associated with higher or lower levels of depressive symptoms. Using nationally representative longitudinal data and an innovative method, the time-varying effect model (TVEM), which examines how the strength of an association changes over time, this study examines how nonmarital sexual intercourse is associated with depressive symptoms at different ages, which behaviors and contexts may contribute to these associations, and whether associations differ for male and female participants. Findings indicate that sexual behavior in adolescence is associated with a higher level of depressive symptoms, particularly for female adolescents, and this association is relatively consistent across different partner types and adolescent contexts. Associations between sexual behavior and depressive symptoms in young adulthood are more dependent on partner factors and adolescent contexts; sexual behavior in young adulthood is associated with fewer depressive symptoms for women who have sex with a single partner and for men whose parents did not strongly disapprove of adolescent sexual behavior. Findings suggest that delaying sexual behavior into young adulthood may have some benefits for mental health, although contextual and relationship factors also play a role.