Xyloglucan endotransglycosylase (XET) genes are widely distributed in most plants, but the codon usage bias of XET genes has remained uncharacterized. Thus, we analyzed the codon usage bias using 4500 codons of 20 XET genes to elucidate the genetic and evolutionary patterns. Phylogenetic and hierarchical cluster analyses revealed that the 20 XET genes belonged to two groups. The closer the genetic distance, the more similar the codon usage preference. The codon usage bias of most XET genes was weak, but there was also some codon usage bias. AGA, AGG, AUC, and GUG were the top four codons (RSCU > 1.5) in the 20 XET genes. CitXET had a stronger codon usage bias, and there were eight optimal codons of CitXET (i.e., AGA, AUU, UCU, CUU, CCA, GCU, GUU, and AAA). The RSCU values underwent a correspondence analysis. The two main factors affecting codon usage bias (i.e., Axes 1 and 2) accounted for 54.8% and 17.6% of the total variation, respectively. Multiple correspondence analysis revealed that XET genes were widely distributed, with Group 1 genes being closer to Axis 1 than Group 2 genes, which were closer to Axis 2. Codons with A/U at the third codon position were distributed closer to Axis 1 than codons with G/C at the third codon position. PgXET, ZmXET, VlXET, VrXET, and PcXET were biased toward codons ending with G/C. In contrast, CitXET, DpXET, and BrpXET were strongly biased toward codons ending with A/U, indicating that these XET genes have a strong codon usage bias. Translational selection and base composition (especially A and U at the third codon position), followed by mutation pressure and natural selection, may be the most important factors affecting codon usage of 20 XET genes. These results may be useful in clarifying the codon usage bias of XET genes and the relevant evolutionary characteristics.