Pornography addiction and sexual dysfunction are increasingly prevalent in young men. Previous studies suggest that prenatal androgen exposure plays a role in addiction and sexual functionality. Here, we tested whether lower second-to-fourth finger length ratio (2D:4D) and later age at spermarche, both putative indicators of higher androgen levels in utero, correlate with online sexual compulsivity (OSC scale of ISST), erectile function (IIEF-5), and ejaculatory control (PEPA) in 4,370 young men (age IQR: 25–26 years) of the Cohort Study on Substance Use Risk Factors. Statistical analyses revealed that lower 2D:4D correlated with higher scores on the OSC scale. Moreover, higher age at spermarche correlated with higher OSC scores and decreased erectile function. Interestingly, OSC severity, but not the frequency of pornography use, correlated negatively with erectile function and ejaculatory control. This is the first study to associate two independent proxies of prenatal testosterone level with OSC. These findings provide novel insight into intrauterine predisposition of sexual behavior and related sexual function in adulthood.