Expansins are plant cell wall-loosening proteins involved in adaptive responses to environmental stimuli and various developmental processes. The first genome-wide analysis of the expansin superfamily in the Arachis genus identified 40 members in A. duranensis and 44 in A. ipaënsis, the wild progenitors of cultivated peanut (A. hypogaea). These expansins were further characterized regarding their subfamily classification, distribution along the genomes, duplication events, molecular structure, and phylogeny. A RNA-seq expression analysis in different Arachis species showed that the majority of these expansins are modulated in response to diverse stresses such as water deficit, root-knot nematode (RKN) infection, and UV exposure, with an expansin-like B gene (AraEXLB8) displaying a highly distinct stress-responsive expression profile. Further analysis of the AraEXLB8 coding sequences showed high conservation across the Arachis genotypes, with eight haplotypes identified. The modulation of AraEXLB8 expression in response to the aforementioned stresses was confirmed by qRT-PCR analysis in distinct Arachis genotypes, whilst in situ hybridization revealed transcripts in different root tissues according to the stress imposed. The overexpression of AraEXLB8 in soybean (Glycine max) composite plants remarkably decreased the number of galls in transformed hairy roots inoculated with RKN. This study improves the current understanding of the molecular evolution, divergence, and gene expression of expansins in Arachis, and provides molecular and functional insights into the role of expansin-like B, the less-studied plant expansin subfamily.Electronic supplementary materialThe online version of this article (doi:10.1007/s11103-017-0594-8) contains supplementary material, which is available to authorized users.