Nucleic acids exist in a dynamic equilibrium with a number of molecules that constantly interact with them and regulate the cellular activities. The inherent nature of the structure and conformational integrity of these macromolecules can lead to altered biological activity through proper targeting of nucleic acids binding ligands or drug molecules. We studied the interaction of naturally occurring methylxanthines such as theophylline, theobromine and caffeine with DNA, using UV absorption and Fourier transform infrared (FTIR) spectroscopic methods, and especially monitored their binding affinity in the presence of Mg2+ and during helix-coil transitions of DNA by temperature (Tm) or pH melting profiles. The study indicates that all these molecules effectively bind to DNA in a dose dependent manner. The overall binding constants of DNA-theophylline = 3.5×103 M−1, DNA-theobromine = 1.1×103 M−1, and DNA-Caffeine = 3.8×103 M−1. On the other hand Tm/pH melting profiles showed 24–35% of enhanced binding activity of methylxanthines during helix-coil transitions of DNA rather than to its native double helical structure. The FTIR analysis divulged that theophylline, theobromine and caffeine interact with all the base pairs of DNA (A-T; G-C) and phosphate group through hydrogen bond (H-bond) interaction. In the presence of Mg2+, methylxanthines altered the structure of DNA from B to A-family. However, the B-family structure of DNA remained unaltered in DNA-methylxanthines complexes or in the absence of Mg2+. The spectral analyses indicated the order of binding affinity as “caffeine≥theophylline>theobromine” to the native double helical DNA, and “theophylline≥theobromine>caffeine to the denatured form of DNA and in the presence of divalent metal ions.