The development of a facile surface-enhanced Raman scattering (SERS) sensor for the on-site detection of trace molecules in liquid phase is a compelling need. In this paper, a three-dimensional (3D) dendritic Au–Ag nanostructure was constructed by a two-step electro displacement reaction in a capillary tube for the on-site liquid phase detection of trace molecules. The multiplasmon resonance mechanism of the dendritic Au–Ag structure was simulated using the finite-difference time domain (FDTD) method. It was confirmed that the highly branched 3D structure promoted the formation of high-density “hot spots” and interacted with the gold nanoparticles at the dendrite tip, gap, and surface to maximize the spatial electric field, which allowed for high signal intensification to be observed. More importantly, the unique structure of the capillary made it possible to achieve the on-site detection of trace molecules in liquids. Using Rhodamine 6G (R6G) solution as a model molecule, the 3D dendritic Au–Ag substrate exhibited a high detection sensitivity (10−13 mol/L). Furthermore, the developed sensor was applied to the detection of antibacterial agents, ciprofloxacin (CIP), with clear Raman characteristic peaks observed even at concentrations as low as 10−9 mol/L. The results demonstrated that the 3D dendritic Au–Ag sensor could successfully realize the rapid on-site SERS detection of trace molecules in liquids, providing a promising platform for ultrasensitive and on-site liquid sample analysis.