Dirigent proteins (DIR) play important roles in the biosynthesis of lignins and lignans, defensive responses, secondary metabolism, and disease resistance in plants. The DIR gene family has been identified and studied in many plants. However, the identification of DIR gene family in eggplant has not been conducted yet. Therefore, in this study, based on the available genome information of eggplant, the DIR family genes in eggplant were identified with bioinformatics methods. The expression pattern analyses of eggplant DIR family genes in different organs and stresses were also conducted to understand their biological functions. The results showed that a total of 24 DIR genes were identified in the eggplant, which were divided into three subfamilies (DIR-a, DIR-b/d, and DIR-e). Synteny analysis of DIR genes among eggplant, Arabidopsis, and rice showed that 15 eggplant DIR genes were colinear with 18 Arabidopsis DIR genes, and 16 eggplant DIR genes were colinear with 15 rice DIR genes. Phylogenetic tree analysis showed that 19 pairs of orthologous genes were identified between eggplant and pepper. The cis-acting elements analysis implied that the eggplant DIR genes contained a lot of cis-elements associated with stress and hormone response. The organ-specific expression analysis of eggplant DIR family genes revealed that only the SmDIR3 gene was highly expressed in all the 19 organs of eggplant. Some SmDIR genes, including SmDIR7, SmDIR8, SmDIR11, SmDIR14, SmDIR18, SmDIR19, SmDIR20, and SmDIR23, were not or were lowly expressed in the eggplant organs, while the other eggplant DIR family genes showed an organ-specific expression pattern. Furthermore, 19 of 24 SmDIR genes were differentially expressed in response to abiotic and biotic stresses. 5 SmDIR genes, including SmDIR3, SmDIR5, SmDIR6, SmDIR12, and SmDIR22, were differentially expressed under multiple types of abiotic and biotic stresses. Especially notable, the SmDIR22 gene was differentially expressed under three types of abiotic stresses and two types of biotic stresses, which indicated that the SmDIR22 gene plays an important role in the response to abiotic and biotic stresses. These results provide valuable evidence for a better understanding of the biological role of DIR genes in eggplant.