Although there are sex-based differences in pain regulation, the mechanisms underlying such differences are poorly understood. Here, we investigated whether androgens are responsible for sex-dependent differences in neurons and microglia that play an important role in abnormal pain in the spinal dorsal horn (SDH). In male mice, androgen receptor (AR) was expressed in the superficial area of the SDH, and most were localized in either excitatory or inhibitory neurons. Moreover, AR was also expressed in C-fibers and A-fibers in the dorsal root ganglia (DRG). AR expression level in SDH and DRG, and mechanical pain threshold were higher in normal male mice than that in female mice or gonadectomized (GDX) male mice. On the other hand, peripheral nerve injury-induced mechanical hypersensitivity was suppressed by treatment with microglial inhibitors in male mice but not female or GDX male mice. These results suggest that androgens may largely affect pain regulatory mechanisms by determining the sex-dependent characteristics of the pain-responsive neurons and spinal microglia.