Objective of this study is to develop a highly effective and durable phosphorus based epoxy resin as anticorrosive coating material for carbon steel in 3% NaCl medium. The hexaglycidyl N,N′,N″‐tris (4,4′‐ethylene dianiline) phosphoramide (HGTEDPA) was characterized using spectral methods. The anticorrosive formulation (HGTEDPA‐MDA) was synthesized using HGTEDPA curing with 4,4′‐methylenedianiline (MDA). The formulation (HGTEDPA‐MDA) coated steel specimens were exposed to UV radiation for a specific durable (189 days) and durability of the formulation was tested along with its inhibition effectiveness. The anticorrosive property of the formulation was evaluated using electrochemical (electrochemical impedance spectroscopy (EIS) and potentiodynamic polarization (PDP)) methods. Results showed that HGTEDPA‐MDA coating improved the corrosion resistance value even after exposing 180 days to the UV radiation. PDP study suggested that HGTEDPA‐MDA before and after UV radiations acted as mainly anodic and cathodic type of inhibitor, respectively. The EIS and PDP results were corroborated with density functional theory (DFT) and molecular dynamic simulations (MDS) methods and a reasonable good agreement was observed. DFT study revealed that HGTEDPA‐MDA interacts with the metallic surface using donor–acceptor interactions. MDS study revealed that HGTEDPA‐MDA spontaneously interacts with steel surface and adsorb using horizontal orientation.