Exploration and construction of novel π-conjugated organic semiconductors with low cost, small background interference, and excellent performance as surface-enhanced Raman scattering (SERS) substrates is one of the current focuses for the development of SERS technology. Based on precise control over synthesis conditions, a series of large-area tetraphenylporphyrin-based 2D covalent-organic framework membranes (2D-porphyrin-COFs) with high uniformity and precisely controllable thickness are constructed as SERS substrates. The delicate balance among the intensity of the substrate interference, the degree of π-conjugation extension, and the proportion of the edge-on channels within the total exposed region results in the optimal SERS performance of ultrathin multilayer 2D-porphyrin-COFs with the thickness between 5.0 to 9.0 nm toward MB, including the enhancement factor on the order of 10