TfxG, one of the tfxABCDEFG cluster genes that code for trifolitoxin (TFX) production, was initially described in Rhizobium leguminosarum bv. trifolii T24. Although several genes in the tfx family have functions related to TFX production or resistance to TFX, the function of tfxG is largely unknown. Using cDNA-amplified fragment length polymorphism (cDNA-AFLP) analysis, we found that expression of the tfxG gene dramatically increased under alkaline culture conditions in Sinorhizobium meliloti CCBAU 81024. This result was confirmed by northern blot analysis. Mutagenesis of tfxG significantly decreased the viability of Sinorhizobium meliloti CCBAU 81024 under alkali stress. Complementation of the tfxG mutant strain using the functional tfxG gene recovered its alkali tolerance to a wild-type level. Genomic analysis of the tfxG gene suggests that choline and homoserine kinase domains may contribute to its alkali tolerance function. This is the first clear evidence that tfxG plays a crucial role in the alkali tolerance of S. meliloti CCBAU 81024, and the finding provides its biological function.