The corrosion inhibition performance of the synthesized diaminohexane modified graphene oxide (DAH-GO) and diaminooctane modified graphene oxide (DAO-GO) was investigated against the corrosion of carbon steel in 15% HCl, utilizing the experimental weight loss and electrochemical measurement techniques at ambient and high temperature. FTIR, Raman, and TEM methods demonstrate that GO was successfully synthesized and grafted with diaminoalkanes. TGA analysis revealed that DAH-GO and DAO-GO are more stable than GO. The effect of temperature and concentration on the inhibitors' efficiency was also studied. The inhibition efficiency of DAHGO increased with concentration, reaching a maximum of 82% while that of DAO-GO reaches a maximum of around 86% at a concentration of 5 ppm for both. The inhibitors performed well at an extremely low concentration at the temperatures tested, however as the temperature rises, the inhibitor's performance reduces. The inhibitors function mostly as an inhibitor of the mixed kind, according to the potentiodynamic polarization measurement. The examined compounds were found to follow the Langmuir adsorption theory. DFT calculations were used to estimate the relative stability of functionalized GOs to GO and to understand the nature of the inhibitor molecules' interactions with the steel surface. The results obtained from the DFT calculations supported the experimental results. Because GO was made from scrap graphite, this work is critical in addressing major environmental concerns: corrosion and waste management.