Regulation of gene expression by DNA methylation is crucial for defining cellular identities and coordinating organism-wide developmental programs in many organisms. In plants, modulation of DNA methylation in response to environmental conditions represents a potentially robust mechanism to regulate gene expression networks; however, examples of dynamic DNA methylation are largely limited to gene imprinting. Here we report an unexpected role for DNA methylation in regulation of the Arabidopsis thaliana immune system. Profiling the DNA methylomes of plants exposed to bacterial pathogen, avirulent bacteria, or salicylic acid (SA) hormone revealed numerous stress-induced differentially methylated regions, many of which were intimately associated with differentially expressed genes. In response to SA, transposon-associated differentially methylated regions, which were accompanied by up-regulation of 21-nt siRNAs, were often coupled to transcriptional changes of the transposon and/or the proximal gene. Thus, dynamic DNA methylation changes within repetitive sequences or transposons can regulate neighboring genes in response to SA stress.