The accumulation of DNA in the cytoplasm or extracellular space is a signal of danger. Plants respond to this signal with a self/non-self-specific activation of early immune signalling events. Here, we asked whether this specificity translates to fitness-relevant resistance to natural enemies. We treated common bean (Phaseolus vulgaris) plants with self-DNA and with non-self-DNA from other plant species. Self-DNA treatment induced jasmonic acid and decreased feeding by a chewing herbivore (Spodoptera frugiperda), while self- and non-self-DNA induced salicylic acid and reduced the population densities of two fungal pathogens (Botrytis cinerea and Sclerotinia sclerotiorum) and of four bacterial pathogens (Enterobacter sp. strain FCB1, Pseudomonas syringae pv. phaseoli and pv. syringae, and Xanthomonas axonopodis pv. phaseoli). Strikingly, a single self-DNA-treatment increased seed production under field conditions in two seasons ca. 1.5-fold and 3.2-fold, while non-self-DNA had lower or no detectable effects. Stronger responses to self- than non-self-DNA seemingly contradict immunological theory. In mammalian immune cells, toll-like receptor 9 (TLR9) is activated by microbial DNA but also by mitochondrial (mt)DNA that is rich in unmethylated CpG motifs. Using bean suspension cells, we observed stronger immunogenic effects of genomic DNA than chloroplast DNA or mtDNA. Moreover, in vitro methylation or cleavage of CpG motifs reduced – without eliminating – the H2O2-inducing properties of DNA. We conclude that the plant immune response to DNA comprises a self/non-self-specific induction of major defence hormones that can be adaptive under natural enemy pressure and that unmethylated CpG motifs contribute to the immunogenic effects of DNA in plants.