In the present study, we investigated the local structure of DNA and its environment using a new visualization technique. The spiral staircase distribution function (SSDF) is determined as two-dimensional density distribution of atoms of water and ligands in local reference frames linked with each base pair of poly-DNA molecule, either GC or AT. This property of SSDF provides opportunity to study sequence-specific binding of ions, peptides, and other agents derived from a molecular dynamics computer simulation. The spatial structure of double-stranded DNA environment in water solution containing either Mg 2+ or Na + ions was investigated using of SSDF. The distributions of ions around GC and AT base pairs are shown separately. It is observed that Mg 2+ ions interact with DNA atoms by means of the layer of water molecules and penetrate into the major groove only. Na + ions have a direct contact with DNA atoms and penetrate both into the major and minor grooves of DNA.