Glucose metabolic disorders, prevalent in numerous metabolic diseases, have become a pressing global public health concern. Artemisinin (ART) and its derivatives, including artesunate (ARTs) and artemether (ARTe), have shown potential as metabolic regulators. However, the specific effects of ART and its derivatives on glucose metabolism under varying nutritional conditions and the associated molecular mechanisms remain largely unexplored. In this study, we examined the impact of ART, ARTs, and ARTe on glucose homeostasis using a mouse model subjected to different dietary regimens. Our findings revealed that ART, ARTs, and ARTe increased blood glucose levels in mice on a normal-chow diet (ND) while mitigating glucose imbalances in high-fat diet (HFD) mice. Notably, treatment with ART, ARTs, and ARTe had contrasting effects on in vivo insulin signaling, impairing it in ND mice and enhancing it in HFD mice. Moreover, the composition of gut microbiota underwent significant alterations following administration of ART and its derivatives. In ND mice, these treatments reduced the populations of bacteria beneficial for improving glucose homeostasis, including Parasutterella, Alloprevotella, Bifidobacterium, Ileibacterium, and Alistipes. In HFD mice, there was an increase in the abundance of beneficial bacteria (Alistipes, Akkermanisia) and a decrease in bacteria known to negatively impact glucose metabolism (Coprobacillus, Helicobacter, Mucispirillum, Enterorhabdus). Altogether, ART, ARTs, and ARTe exhibited distinct effects on the regulation of glucose metabolism, depending on the nutritional context, and these effects were closely associated with modifications in gut microbiota composition.