A novel SERS substrate based on a zeolitic imidazolate framework-8 (ZIF-8) film-modified Au-Ag/Si nanoporous pillar array (ZIF-8/Au-Ag/Si-NPA) was successfully fabricated for pentachlorophenol (PCP) detection. The Au-Ag/Si-NPA was synthesized through immersion plating and replacement reaction on the Si-NPA, which was prepared by the hydrothermal etching. The ZIF-8 film was coated via layer-by-layer growth technique. The ZIF-8 film is nanoporous and its thickness can be controlled by varying the growing number, which can significantly influence the SERS performance of the substrate. The substrate with optimal ZIF-8 thickness exhibited an excellent SERS response to PCP molecules. The SERS enhancement factor reached up to 1.8 × 107 and the detection limit was down to 10-13 M. Moreover, the substrate showed good uniformity with a relative standard deviation (RSD) of 8.7% and good selectivity. The PCP detection is hardly interfered by the coexisting organic compounds. The high SERS performance may be due to the enrichment effect of the ZIF-8 film. The ZIF-8 film could capture and enrich the trace PCP molecules by electrostatic interaction between the negatively charged PCP- and the positively charged ZIF-8. This work suggests that the ZIF-8/Au-Ag/Si-NPA substrate has potential application in SERS analysis of the polar organic pollutant detection in environmental media.