Abiotic stresses greatly affect the immunity of plants. However, it is unknown whether pathogen infection affects abiotic stress tolerance of host plants. Here, the effect of defense response on cold and heat tolerance of host plants was investigated in Pst DC3000‐infected Arabidopsis plants, and it was found that the pathogen‐induced defense response could alleviate the injury caused by subsequent cold and heat stress (38°C). Transcriptomic sequencing plus RT‐qPCR analyses showed that some abiotic stress genes are up‐regulated in transcription by pathogen infection, including cold signaling components ICE1, CBF1, and CBF3, and some heat signaling components HSFs and HSPs. Moreover, the pathogen‐induced alleviation of cold and heat injury was lost in NahG transgenic line (SA‐deficient), sid2‐2 and npr1‐1 mutant plants, and pathogen‐induced expression of cold and heat tolerance‐related genes such as CBFs and HSPs, respectively, was lost or compromised in these plants, indicating that salicylic acid signaling pathway is required for the alleviation of cold and heat injury by pathogen infection. In short, our current work showed that in fighting against pathogens, host plants also enhance their cold and heat tolerance via a salicylic acid‐dependent pathway.