Nanostructure-based surface-enhanced Raman scattering (SERS) substrates have drawn increasing interest because of their wide variety of applications. In particular, SERS integrated with microfluidic devices have shown merit in detecting liquid solvents. In this study, a SERS–microfluidic device is prepared using the atomic force microscopy (AFM) tip-based nanoscratching technique. The influence of the normal load on the period and amplitude of the machined nanogroove are investigated. Nanodot arrays are also fabricated using a twice-scratching strategy. The effects of the feed value and scratching angle on the morphologies of the nanodot arrays are studied, and the Raman spectra of rhodamine 6G (R6G) are detected based on the fabricated nanostructures. The influences of the Au film thickness and period of the nanostructure on the SERS intensity are studied and agree well with the simulated results obtained using the COMSOL software. Furthermore, the Raman spectra of R6G obtained by the SERS substrate and SERS–microfluidic device are compared. The Raman spectra of a mixture of R6G and malachite green (MG) are also measured using the SERS-microfluidic device. In principle, the method reported here could be implemented to prepare SERS microfluidic devices used in biological or chemical molecular detection.