Interstitial inflammation is the main pathological feature in kidneys following injury, and the polarization of macrophages is involved in the process of inflammatory injury. Previous studies have shown that quercetin has a renal anti-inflammatory activity, but the potential molecular mechanism remains unknown. In obstructive kidneys, administration of quercetin inhibited tubulointerstitial injury and reduced the synthesis and release of inflammatory factors. Further study revealed that quercetin inhibited the infiltration of CD68+ macrophages in renal interstitium. Moreover, the decrease in levels of iNOS and IL-12, as well as the proportion of F4/80+/CD11b+/CD86+ macrophages, indicated quercetin-mediated inhibition of M1 macrophage polarization in the injured kidneys. In cultured macrophages, lipopolysaccharide-induced inflammatory polarization was suppressed by quercetin treatment, resulting in the reduction of the release of inflammatory factors. Notably, quercetin-induced inhibitory effects on inflammatory macrophage polarization were associated with down-regulated activities of NF-κB p65 and IRF5, and thus led to the inactivation of upstream signaling TLR4/Myd88. Interestingly, quercetin also inhibited the polarization of F4/80+/CD11b+/CD206+ M2 macrophages, and reduced excessive accumulation of extracellular matrix and interstitial fibrosis by antagonizing the TGF-β1/Smad2/3 signaling. Thus, quercetin ameliorates kidney injury via modulating macrophage polarization, and may have therapeutic potential for patients with kidney injury.