In this study, the anionic state of Ceftriaxone sodium (Cefx) and Ceftazidime (Cefz) medication corrosion inhibition capabilities for Al in 0.1 M NaOH solution are explored using various electrochemical analyses. Furthermore, the morphological structure and surface chemical composition of the impact of these drugs on the Al substrate in NaOH are investigated. For the prediction and analysis of interactions between molecule structure and inhibition efficiency, quantum chemical calculations (QC), Monte Carlo simulations (MC), and molecular dynamics (MD) simulations (MD) are performed. The electrochemical findings reveal that the inhibitory effectiveness increases with increasing drug concentrations and declines with rising temperature, reaching a maximum value of 78.4% for 300 ppm Cefx while 59.5% for 300 ppm Cefz at 293 K, implying that Cefx outperforms for Cefz. In addition, the studied drugs act as cathodic inhibitors, and their adsorption is spontaneous and mixed type adsorption in its nature that obeys Freundlich isotherm for Cefz while Temkin isotherm is the best-fitted one for Cefx. Surface analysis and wettability measurements imply that Cefx and Cefz shield the Al against corrosion by surface adsorption and generating a protective hydrophobic film. Thermodynamic activation parameters in the absence and presence of 300 ppm of the studied drugs are calculated and discussed. The energies of the border molecular orbitals and computed molecular parameters for the investigated drugs revealed that anionic Cefx is more readily adsorbed on the Al surface than Cefz. This finding is validated further using MC and MD simulations. Overall, the proposed cephalosporin drugs delivered a cost-effective and facile approach for boosting the efficiency of corrosion inhibitors for Al under aggressive conditions.