The type III secretion systems (T3SS) and secreted effectors (T3SEs) are essential virulence factors in Gram-negative bacteria. During the arms race, plants have evolved resistance (R) genes to detect specific T3SEs and activate defence responses. However, this immunity can be efficiently defeated by the pathogens through effector evolution. HopZ1 of the plant pathogen Pseudomonas syringae is a member of the widely distributed YopJ T3SE family. Three alleles are known to be present in P. syringae, with HopZ1a most resembling the ancestral allelic form. In this study, molecular mechanisms underlying the sequence diversification-enabled HopZ1 allelic specificity is investigated. Using domain shuffling experiments, we present evidence showing that a central domain upstream of the conserved catalytic cysteine residue determines HopZ1 recognition specificity. Random and targeted mutagenesis identified three amino acids involved in HopZ1 allelic specificity. Particularly, the exchange of cysteine141 in HopZ1a with lysine137 at the corresponding position in HopZ1b abolished HopZ1a recognition in soybean. This position is under strong positive selection, suggesting that the cysteine/lysine mutation might be a key step driving the evolution of HopZ1. Our data support a model in which sequence diversification imposed by the plant R gene-associated immunity has driven HopZ1 evolution by allowing allele-specific substrate-binding.