Objective To determine if risky sexual intercourse, sexually transmitted diseases, and sexual intercourse at an early age are associated with psychiatric disorder. Design Cross sectional study of a birth cohort at age 21 years with assessments presented by computer (for sexual behaviour) and by trained interviewers (for psychiatric disorder). Setting New Zealand in 1993-4. Participants 992 study members (487 women) from the Dunedin multidisciplinary health and development study. Complete data were available on both measures for 930 study members. Main outcome measures Psychiatric disorders (anxiety, depression, eating disorder, substance dependence, antisocial disorder, mania, schizophrenia spectrum) and measures of sexual behaviour. Results Young people diagnosed with substance dependence, schizophrenia spectrum, and antisocial disorders were more likely to engage in risky sexual intercourse, contract sexually transmitted diseases, and have sexual intercourse at an early age (before 16 years). Unexpectedly, so were young people with depressive disorders. Young people with mania were more likely to report risky sexual intercourse and have sexually transmitted diseases. The likelihood of risky behaviour was increased by psychiatric comorbidity. Conclusions There is a clear association between risky sexual behaviour and common psychiatric disorders. Although the temporal relation is uncertain, the results indicate the need to coordinate sexual medicine with mental health services in the treatment of young people.