Pepper (Capsicum annuum) responds differently to high temperature stress (HTS) and Ralstonia solanacearum infection (RSI) but employs some shared transcription factors (TFs), such as CabZIP63 and CaWRKY40, in both cases. How the plant activates and balances these distinct responses, however, was unclear. Here, we show that the protein CaSWC4 interacts with CaRUVBL2 and CaTAF14b and they all act positively in pepper response to RSI and thermotolerance. CaSWC4 activates chromatin of immunity or thermotolerance related target genes of CaWRKY40 or CabZIP63 by promoting deposition of H2A.Z, H3K9ac and H4K5ac, simultaneously recruits CabZIP63 and CaWRKY40 through physical interaction and brings them to their targets (immunity- or thermotolerance-related genes) via binding AT-rich DNA element. The above process relies on the recruitment of CaRUVBL2 and TAF14 by CaSWC4 via physical interaction, which occurs at loci of immunity related target genes only when the plants are challenged with RSI, and at loci of thermotolerance related target genes only upon HTS. Collectively, our data suggest that CaSWC4 regulates rapid, accurate responses to both RSI and HTS by modulating chromatin of specific target genes opening and recruiting the TFs, CaRUVBL2 and CaTAF14b to the specific target genes, thereby helping achieve the balance between immunity and thermotolerance.