The role of chromatin biology and epigenetics in disease progression is gaining increasing recognition. Genes that escape X chromosome inactivation (XCI) can impact neuroinflammation through epigenetic mechanisms. Our prior research has suggested that the X escapee genes Kdm6a and Kdm5c are involved in microglial activation after stroke in aged mice. However, the underlying mechanisms remain unclear. We hypothesized that Kdm6a/5c demethylate H3K27Me3/H3K4Me3 in microglia respectively, and mediate the transcription of interferon regulatory factor 5 (IRF5) and IRF4, leading to microglial pro-inflammatory responses and exacerbated stroke injury. Aged (17–20 months) Kdm6a/5c microglial conditional knockout (CKO) female mice (one allele of the gene) were subjected to a 60-min middle cerebral artery occlusion (MCAO). Gene floxed females (two alleles) and males (one allele) were included as controls. Infarct volume and behavioral deficits were quantified 3 days after stroke. Immune responses including microglial activation and infiltration of peripheral leukocytes in the ischemic brain were assessed by flow cytometry. Epigenetic modification of IRF5/4 by Kdm6a/5c were analyzed by CUT&RUN assay. The demethylation of H3K27Me3 by kdm6a increased IRF5 transcription; meanwhile Kdm5c demethylated H3K4Me3 to repress IRF5. Both Kdm6afl/fl and Kdm5cfl/fl mice had worse stroke outcomes compared to fl/y and CKO mice. Gene floxed females showed more robust expression of CD68 in microglia, elevated brain and plasma levels of IL-1β or TNF-α, after stroke. We concluded that IRF5 signaling plays a critical role in mediating the deleterious effect of Kdm6a; whereas Kdm5c’s effect is independent of IRF5.