We previously demonstrated that androgen signaling expands pancreatic β-cell mass in the sexual maturation period (Am J Physiol Endocrinol Metab 314: E274-E286, 2018). The aim of this study was to elucidate whether fetal androgen signaling plays important roles in β-cell mass development and β-cell function in adulthood, defects of which are associated with type 2 diabetes mellitus. In the pancreas of male fetuses, androgen receptor (AR) was strongly expressed in the cytoplasm and at the cell membrane of Nkx6.1-positive β-cell precursor cells but was markedly reduced in insulin-positive β-cells. Administration of the anti-androgen flutamide to pregnant dams during late gestation reduced β-cell mass and Ki67-positive proliferating β-cells at birth in a male-specific manner without affecting body weight. The decrease of β-cell mass in flutamide-exposed male rats was not recovered when rats were fed a standard diet, whereas it was fully recovered when rats were fed a high-fat diet (HFD), at 6 and 12 wk of age. Flutamide exposure in utero led to the development of glucose intolerance in male rats due to a decrease in insulin secretion when fed HFD but not standard diet. Insulin sensitivity did not differ between the two groups irrespective of diet. These results indicated that the action of fetal androgen contributed to β-cell mass expansion in a sex-specific manner at birth and to the development of glucose intolerance by decreasing the secretion of insulin in HFD-fed male rats. Our data demonstrated the involvement of fetal androgen signaling in hypothesized sex differences in the developmental origins of health and disease by affecting pancreatic β-cell function.