Microglia, as immune cells in the central nervous system, possess the ability to adapt morphologically and functionally to their environment. Glymphatic system, the principal waste clearance system in the brain, exhibits circadian rhythms. However, the impact of microglia on the glymphatic system function remains unknown. In this study, we explored the intricate relationship between microglia and the glymphatic system. Examining diurnal patterns, we identified synchronized behaviors in glymphatic activity and microglial morphology, peaking during sleep and exhibiting distinct changes in branching complexity. Depleting microglia using PLX5622 or in P2Y12 knockout mice enhanced glymphatic function. Chemogenetic manipulation of microglia demonstrated that activating HM3D improved glymphatic function, while inhibiting HM4D unexpectedly increased microglial complexity. These findings highlight the dynamic influence of microglia on the glymphatic system.