Background: The APETALA2/ethylene responsive factor (AP2/ERF) superfamily members are transcription factors that regulate diverse developmental processes and stress responses in plants. They have been identified in many plants. However, little is known about the AP2/ERF superfamily in longan (Dimocarpus longan Lour.), which is an important tropical/subtropical evergreen fruit tree that produces a variety of bioactive compounds with rich nutritional and medicinal value. We conducted a genome-wide analysis of the AP2/ERF superfamily and its roles in somatic embryogenesis (SE) and developmental processes in longan. Results: A genome-wide survey of the AP2/ERF superfamily was carried out to discover its evolution and function in longan. We identified 125 longan AP2/ERF genes and classified them into the ERF (101 members), AP2 (19 members), RAV (four members) families, and one Soloist. The AP2 and Soloist genes contained one to ten introns, whereas 87 genes in the ERF and RAV families had no introns. Hormone signaling molecules such as methyl jasmonate (MeJA), abscisic acid (ABA), gibberellin, auxin, and salicylic acid (SA), and stress response cis-acting element low-temperature (55) and defense (49) boxes also were identified. We detected diverse single nucleotide polymorphisms (SNPs) between the 'Hong He Zi' (HHZ) and 'SI JI MI' (SJM) cultivars. The number of insertions and deletions (InDels) was far fewer than SNPs. The AP2 family members exhibited more alternative splicing (AS) events in different developmental processes of longan than members of the other families. Expression pattern analysis revealed that some AP2/ERF members regulated early SE and developmental processes in longan seed, root, and flower, and responded to exogenous hormones such as MeJA, SA, and ABA, and 2,4-D, a synthetic auxin. Protein interaction predictions indicated that the Baby Boom (BBM) transcription factor, which was up-regulated at the transcriptional level in early SE, may interact with the LALF/AGL15 network. Conclusions: The comprehensive analysis of molecular evolution and expression patterns suggested that the AP2/ERF superfamily may plays an important role in longan, especially in early SE, and in seed, root, flower, and young fruit. This systematic analysis provides a foundation for further functional characterization of the AP2/ERF superfamily with the aim of longan improvement.