© 2017 American Chemical Society. Herein, the synthesis of three zwitterionic compounds (GZC-8, GZC-12, and GZC-18) derived from β-amino acids was carried out in good yield (>97%) through an ecofriendly, zero-waste synthesis procedure, starting from alkylamines (octylamine, dodecylamine, octadecylamine) and acrylic acid, under solventless conditions at ambient pressure and temperature. These compounds were characterized by Fourier transform infrared, two-dimensional nuclear magnetic resonance, electrospray ionization mass spectrometry, and elemental analyses and then evaluated as potential corrosion inhibitors for CO2 acidic environments characteristic of enhanced oil recovery (EOR) processes of the petroleum industry through electrochemical techniques such as open circuit potential (OCP), lineal polarization resistance (LRP), electrochemical impedance spectroscopy (EIS) at different immersion times, and potentiodynamic polarization after 24 h of immersion. From experimental measurements, inhibition efficiencies of 60, 89, and 90% were obtained for GZC-8, GZC-12, and GZC-18, respectively at a concentration of 25 ppm. In addition, acute toxicity of GZCs was evaluated on Photobacterium phosphoreum (Vibrio fischeri) by Microtox testing from which an EC50 value of 209, 188, and 43 ppm was obtained for GZC-8, GZC-12, and GZC-18, respectively, i.e., 2 orders of magnitude lower than typical ionic liquid inhibitors. From experimental results, it was found that the GZC-12 compound presented an adequate balance between inhibition efficiency and toxicity with maximum efficiency of 98.9% at a concentration of 75 ppm. Accordingly, GZC-12 can be classified as well-suited to human health and the environment and thus as a greener production alternative for oil and gas industry operations.