High glucose levels negatively affect immune response. However, the underlying mechanisms are not well understood. Upon infection, the round worm C. elegans induces multiple gene transcription programs, including the Nrf2/SKN-1-mediated detoxification program, to activate the innate immunity. In this study, we find that high glucose conditions inhibit the SKN-1-mediated immune response to Salmonella typhimurium, exacerbate the infection and greatly decrease survival. The effect of glucose shows specificity to SKN-1 pathway, as UPRmit and UPRER that are known to be induced by infection, are not affected. Hyper-activation of SKN-1 by wdr-23 RNAi restores partly the immune response and increases the survival rate in response to S. typhimurium. In all, our study reveals a molecular pathway responsible for glucose’s negative effect on innate immunity, which could help to better understand diseases associated with hyperglycemia.