Immune responses protect against the impact of infectious diseases on behaviour and other traits underlying reproductive fitness. But these responses often come with a cost. In mosquitoes, for example, some immune responses induce oxidative stress, increasing the selective pressure to manage oxidative homeostasis. One way that mosquitoes could stimulate their immune system while maintaining oxidative homeostasis is by self-medicating with appropriate, biologically active substances like nectars. We therefore compared the dietary preferences ofAnopheles gambiaemosquitoes that were uninfected or infected with the microsporidian parasiteVavraia culicis. To do so, we measured the proportions of 0, 4 and 8-day-old mosquitoes feeding on sugar and on sugar supplemented with hydrogen peroxide (a prooxidant) or vitamin C (an antioxidant), and we measured the impact of these diets on oxidative homeostasis and parasite load. Uninfected mosquitoes preferred to feed on sugar without either of the supplements. One reason could be that supplementing the sugar meal with the prooxidant for seven days increased their oxidative stress. In contrast, infected mosquitoes preferred to feed on sugar supplemented with the prooxidant when they were young and increased their preference for the antioxidant as they grew older. Consuming the prooxidant for seven days decreased the parasite load, and, while infection itself increased the oxidative stress, consuming the prooxidant lowered the oxidative stress of infected mosquitoes. Finally, feeding on the antioxidant had only little influence on the parasite load or on oxidative stress. These findings suggest that mosquitoes can self-medicate by consuming nectar with appropriate levels of prooxidants and antioxidants. Since mosquitoes, includingAn. gambiae, are vectors of many vector-borne infectious diseases, our results may have important implications for public health.