Premature ejaculation (PE) and erectile dysfunction (ED), which is common male sexual dysfunctions worldwide, lead to substantial distress in men as well as their partners, and decrease the quality and stability of romantic relationships, and, consequently, lead to a decreased quality of life in a large part of the population. We investigated the associations between self-reported anatomical characteristics of the penis and PE and ED in an urban Chinese sample. We recruited 1976 Chinese urban men aged 18 to 50 to fill out an online questionnaire regarding demographic information, anatomical characteristics of the penis, as well as PE and ED. Participants reported their age, penile length, penile circumference, circumcision status, and foreskin characteristics as well as answered the International Index of Erectile Function-5 (IIEF-5) and Checklist for Early Ejaculation Symptoms (CHEES). Penile length and girth were associated with less ejaculatory problems, but only penile length was associated with less erectile problems. Results showed that overall higher age was associated with less ejaculatory and erectile problems. This pattern was confirmed in the younger group (age < = 31) where higher age was associated with less ejaculatory and erectile problems. However, in the older group (age > 31), higher age was associated with more ejaculatory and erectile problems. The relationship between penile length and sexual function did not change with age whereas penile girth was associated with less ejaculatory problems in the older age group only. Male circumcision and less foreskin covering the glans penis were associated with less ejaculatory and erectile problems. The present study is the first study to investigate the association between anatomical characteristics of the penis (penis size and circumcision) and sexual function. However, the self-reported measurement of penis size is a potential limitation. the penis size was measured by self-reported. There is a potential limitation to the reliability of such self-reports. The results indicated that the relationship between the anatomical characteristics of the penis and sexual function was complex. Also, the effects of age on sexual function were positive among younger men and negative among older men.