Functional dyspepsia (FD) is a very common disease worldwide. Dysmenorrhea impairs quality of life among females of reproductive age. Although dysmenorrhea is associated with irritable bowel syndrome (IBS), no study has yet evaluated the association between dysmenorrhea and FD. This study's subjects consisted of 4693 female Japanese university students. We defined FD according to the Rome III criteria. Subjects completed a self-reported questionnaire regarding menstrual irregularity, menstrual pain, and medication for menstrual pain. Age, body mass index, drinking, smoking, exercise habit, anemia, and first-year student status were selected as potential confounding factors. The prevalence of FD, epigastric pain syndrome (EPS), and postprandial distress syndrome (PDS) was 2.5%, 0.6%, and 2.1%, respectively. Heavy menstrual pain was independently positively associated with FD and PDS but not EPS (adjusted ORs: FD, 3.18 [95% CI: 1.60-6.89] and PDS, 2.93 [95% CI: 1.56-7.93] for heavy menstrual pain, p for trend=0.001 and 0.004, respectively). Using medication for menstrual pain often was independently positively associated with FD, EPS, and PDS, respectively, (adjusted ORs: FD, 2.41 [95% CI: 1.50-3.83], EPS, 2.93 [95% CI: 1.04-7.93], PDS, 2.44 [95% CI: 1.46-4.01]). Irregular menstrual cycle was not associated with FD or with subtype of FD. Among the young female Japanese population, menstrual pain might be independently positively associated with FD and PDS but not EPS. The use of medication for menstrual pain might be independently positively associated with FD including subtype of FD.