The amidation of pectin by amino acids has been widely applied due to its safety and excellent gelling properties. This study systematically examined the effects of pH on the gelling properties of lysine-amidated pectin during amidation and gelation. Pectin was amidated over the range of pH 4–10, and the amidated pectin obtained at pH 10 showed the highest degree of amidation (DA, 27.0 %) due to the de-esterification, electrostatic attraction, and the stretching state of pectin. Moreover, it also exhibited the best gelling properties due to its greater numbers of calcium-binding regions (carboxyl groups) and hydrogen bond donors (amide groups). During gelation, the gel strength of CP (Lys 10) at pH 3–10 first increased and then decreased, with the highest gel strength at pH 8, which was due to the deprotonation of carboxyl groups, protonation of amino groups, and β-elimination. These results show that pH plays a key role in both amidation and gelation, with distinct mechanisms, and would provide a basis for the preparation of amidated pectins with excellent gelling properties. This will facilitate their application in the food industry.