Three-dimensional (3D) hierarchical nanostructures have been considered as one of the most promising surface-enhanced Raman spectroscopy (SERS) substrates because of the ordered arrangement of high-density hotspots along the third dimension direction. Herein, we reported a unique 3D nanostructure for SERS detection based on silver nanoparticles (AgNPs) decorated zinc oxide/silicon (ZnO/Si) heterostructured nanomace arrays. They were prepared by two steps: (1) Si nanoneedles were grafted onto ZnO nanorod arrays via a catalyst-assisted vapor-liquid-solid (VLS) growth mechanism. (2) AgNPs were rapidly immobilized on the surface of nanomaces by a facile galvanic displacement reaction. The fabricated substrates were employed to detect rhodamine 6G (R6G) with a detection limit down to 10(-16) M, and exhibited a high-enhanced performance (enhancement factor (EF) as high as 8.7 × 10(7)). To illustrate the potential value of the prepared substrates, the different concentrations of melamine aqueous solution (from 10(-4) to 10(-10) M) were detected, and a quantitative relationship between the SERS spectrum intensity and the melamine concentration had been established. In addition, the measure of melamine residual in pure milk was carried out successfully, and the results indicated that the prepared 3D nanomace substrates had great potential in food inspection, environment protection, and a few other technologically important fields.