The design and synthesis of a series of theophylline derivatives containing 1,2,3-triazole moieties is presented. The corrosion inhibition activities of these new triazole-theophylline compounds were evaluated by studying the corrosion of API 5L X52 steel in 1 M HCl media. The results showed that an increase in the concentration of the theophylline-triazole derivatives also increases the charge transference resistance (Rct) value, enhancing inhibition efficiency and decreasing the corrosion process. The electrochemical impedance spectroscopy under static conditions studies revealed that the best inhibition efficiencies (~90%) at 50 ppm are presented by the all- substituted compounds. According to the Langmuir isotherm, the compounds 4 and 5 analyzed exhibit physisorption-chemisorption process, with exception of the hydrogen 3, bromo 6 and iodo 7 substituted compound, which exhibit chemisorption process. The corrosion when submerging a steel bar in 1 M HCl was studied using SEM-EDS. This experiment showed that the corrosion process decreases considerably in the presence of 50 ppm of the organic inhibitors. Finally, theoretical study showed a correlation between EHOMO, hardness (η), electrophilicity (W), atomic charge and the inhibition efficiency in which the iodo 7 substituted compound presents the best inhibitor behavior.