Abstract In the current study, we decided to investigate the interaction of Mercaptopurine (MEC) drug with adenine, thymine, guanine and cytosine nucleobase of DNA at ωB97XD/6-311G (d, p) level of density functional theory by using Gaussian 16 software. The thermodynamic results indicate that interaction of MEC drug with DNA nucleobase exothermic and favorable in the thermodynamic view. The results of the results can be used for detecting the nature of MEC drug with nucleobase of DNA.