In this study, two tri-cationic surfactants containing two amide functional groups and three positively charged quaternary aminium nitrogens were synthesized. The structures of the synthesized surfactants were proved by various spectroscopic methods (FT-IR, H-1 NMR, and C-13 NMR). Inhibition activities of two synthesized products against mild steel corrosion were determined using the weight loss method in 1.0 M HCl acidic medium. As a result of corrosion tests performed by immersing metal coupons in acidic solutions with different inhibitor concentrations for 24 h at room temperature, close and effective inhibitions were obtained for both surfactants. It has been found that the number of carbons in the long carbon chain in their structures is an effective factor in corrosion protection. In the acid environment, the corrosion inhibition efficiency of the inhibitor with more carbon in the long chain was found slightly higher than the other. While the compound containing 16 carbon atoms in its long chain showed corrosion inhibition over 92%, the compound containing 12 carbons in its long chain exhibited corrosion inhibition of 90% and below. In addition, some physicochemical parameters such as critical micelle concentration, surface tensions at this concentration, and free energy of micelle formation were calculated for the tri-cationic surfactants in order to correlate them with their anti-corrosion activities. Surface images were also taken by scanning electron microscope, which is an important supporting evidence that surfactants adsorb on the metal surface and protect the surface from corrosion, to determine the roughness conditions on the metal surfaces immersed in the acid solution.