The development of valid chemical enhancement strategy with charge transfer (CT) for semiconductors has great scientific significance in surface-enhanced Raman scattering (SERS) technology. Herein, a phosphorus doped crystalline/amorphous polymeric carbon nitride (PCPCN) is fabricated by a facile molten salt method, and is employed as a SERS substrate for the first time. Upon the synergies of phosphatization and molten salt etching, PCPCN owns a cascaded internal electric field (IEF) due to the formation of p-n homojunction (interface-IEF) and crystalline/amorphous homojunction (bulk-IEF). The interface-IEF and bulk-IEF could effectively suppress the recombination of charge carriers and promote electron transfer between PCPCN and target methylene blue (MB), respectively. The strong CT interaction endows PCPCN substrate with superior SERS activity with an enhancement factor (EF) of 5.53 × 105. Au nanoparticles (Au NPs) are subsequently decorated on PCPCN to introduce electromagnetic enhancement for a better SERS response. The Au/PCPCN substrate allows to reliably detect trace crystal violet, as well as the thiram residue on cherry tomato. This work offers an integrated solution to enhance CT efficiency based on collaborative homojunction and internal electric field, and may inspire the design of novel semiconductor-based SERS substrates.