This study aimed to optimize the detection conditions for surface-enhanced Raman spectroscopy (SERS) of single-stranded DNA (ssDNA) in four different buffers and explore the interaction between gonyautoxin (GTX1/4) and its aptamer, GO18. The influence of the silver colloid solution and MgSO concentration (0.01 M) added under four different buffered conditions on DNA SERS detection was studied to determine the optimum detection conditions.