In this work, introduces a new type of corrosion inhibitors for stainless steel 316 (SS316) in hydrochloric acid (HCl) media. These new organic inhibitors has been synthesized by in situ polymerizations of poly (aniline-co-o-anthranilic acid), graphene oxide (GO) and functionalized carbon nanotubes (f-CNT). It was expected that the presence of these nanostructures in the copolymer substrate would increase their ability to control corrosion. The optimum percentages for GO and carbon nanotubes are 5% and 4%, respectively. X-ray diffraction (XRD), Fourier-transform infrared spectroscopy (FT-IR), scanning electron microscope (SEM), and transmission electron microscope (TEM) techniques are used to characterize morphology and chemical composition of the prepared nanocomposites. The corrosion-inhibition performance of SS316 is evaluated in hydrochloric acid (2 M) by electrochemical measurements containing potentiodynamic polarization and electrochemical impedance spectroscopy in the presence of prepared inhibitors. Atomic force microscopy (AFM) and SEM techniques are also used to study the surfaces of SS316 after contact with test solution. The results of this study confirmed that the presence of these nanostructures in the poly (aniline-co-o-anthranilic acid) substrate increases its corrosion inhibition efficiency.