Based on the newly acquired dense gas observations from the JCMT MALATANG survey and X-ray data from Chandra, we explore the correlation between hot gas and HCN J = 4 → 3 and HCO+ J = 4 → 3 emission for the first time at subkiloparsec scale of five nearby star-forming galaxies, namely M82, M83, IC 342, NGC 253, and NGC 6946. We find that both HCN J = 4 → 3 and HCO+ J = 4 → 3 line luminosity show a statistically significant correlation with the 0.5−2 keV X-ray emission of the diffuse hot gas ( L0.5−2keVgas ). The Bayesian regression analysis gives the best fit of log(L0.5−2keVgas / ergs−1)=2.39log(LHCN(4−3)′ /K km s−1 pc2) + 24.83 and log(L0.5−2keVgas / ergs−1)=2.48log(LHCO+(4−3)′ /K km s−1 pc2) + 23.84, with dispersion of ∼0.69 dex and 0.54 dex, respectively. At the subkiloparsec scale, we find that the power-law index of the L0.5−2keVgas −star formation rate (SFR) relation is log(L0.5−2keVgas/ergs−1)=1.80log(SFR/M⊙yr−1)+39.16 , deviated from previous linear relations at the global scale. This implies that the global property of hot gas significantly differs from individual resolved regions, which is influenced by the local physical conditions close to the sites of star formation.