The present paper introduces a facile and cost-effective route for the direct dispersion of multi-walled carbon nanotubes (MWCNTs) in DNA solution. Their application in detecting Escherichia coli O157:H7 using DNA biosensor was demonstrated. The dispersion state of the MWCNTs was characterized via UV–Vis spectroscopy, transmission electron microscopy, and field emission scanning electron microscopy. The interaction between DNA sequence and the MWCNTs was investigated using Raman spectroscopy and Fourier transform infrared spectroscopy. As-obtained MWCNT solution was used in the preparation of DNA sensor. Results revealed that the developed DNA sensor can detect a DNA target as low as 1nM in a buffer solution. The sensitivity of the DNA sensor reached approximately 0.19nM/mV. The effect of dispersion parameters, including pH values, DNA concentration, ion strength, and sonication time, on sensor response was also studied. The DNA sensor can respond well to 120min of sonication time, a pH value of 9, and 20μM of DNA sequence concentration. The results of the present study showed a potential application of the DNA sensor in the detection of Escherichia coli O157:H7.