Although spermatogenic dysfunction is widely found in patients with human immunodeficiency virus (HIV), the underlying reasons remain unclear. Thus far, potential hypotheses involving viral reservoirs, testicular inflammation, hormone imbalance, and cachexia show inconsistent correlation with spermatogenic dysfunction. Here, northern pig-tailed macaques (NPMs) exhibited marked spermatogenic dysfunction after long-term infection with simian immunodeficiency virus (SIVmac239), with significant decreases in Johnsen scores, differentiated spermatogonial stem cells, and testicular proliferating cells. The above hypotheses were also evaluated. Results showed no differences between SIV− and SIV+ NPMs, except for an increase in follicle stimulating hormone (FSH) during SIV infection, which had no direct effect on the testes. However, long-term SIVmac239 infection undermined pancreatic islet β cell function, partly represented by significant reductions in cellular counts and autophagy levels. Pancreatic islet β cell dysfunction led to glucose metabolism disorder at the whole-body level, which inhibited lactate production by Sertoli cells in testicular tissue. As lactate is the main energy substrate for developing germ cells, its decrease was strongly correlated with spermatogenic dysfunction. Therefore, glucose metabolism disorder appears to be a primary cause of spermatogenic dysfunction in NPMs with long-term SIVmac239 infection.