Three-dimensional (3D) hotspots for ultrahigh surface-enhanced Raman scattering (SERS) has been experimentally demonstrated by evaporating a droplet of citrate-Ag sols on both hydrophobic and hydrophilic flat surfaces. Interestingly, the hydrophobic surface increased the Raman enhancement by two orders of magnitude and exhibits a better signal stability than the hydrophilic one. This study highlights the differences between hydrophilic and hydrophobic surfaces in enhanced Raman scattering by the use of extremely diluted rhodamine 6G (R6G) as the SERS reporter. In situ synchrotron-radiation small-angle X-ray scattering (SR-SAXS) was employed to explore the evolution of the 3D geometry of Ag nanoparticles in a single droplet and verify the influence mechanism of these two kinds of surface. The ideal situation of 3D self-assembly of nanoparticles in the evaporation process is a collaborative behaviour, but our results evidenced that a progressive 3D self-assembly of nanoparticles was more preferred due to the interface effects. Our experimental data derived from in situ SR-SAXS reveals that a truly distinct 3D geometry of the Ag particles develops during the evaporation process on both hydrophilic and hydrophobic surfaces. In this type of 3D geometry, the increased uniformity of the interparticle distance induced a sharp peak of the SR-SAXS signal, differing significantly from the dry state. In particular, the fluorosilylated surface reduces the interaction with particles and decreases the electrostatic adsorption on the flat surface, which helps to control the interparticle distance to remain within a small range, produce a larger number of hotspots in 3D space, and amplify the SERS enhancement accordingly.