Structural modulation of pristine graphitic carbon nitride presents a significant challenge in the rational design of catalysts for efficient degradation of small organic pollutants under visible light. In this study, we combining first-principles calculations and structure-function relationship to predict a high-performance catalyst. The results indicate that CN-8 exhibits a significant degree of separation between electrons and holes, the CN-8 exhibits exceptional degradation efficiency towards rhodamine B, tetracycline and bisphenol A under visible light irradiation. The degradation rate constants are 0.6436 min-1, 0.2432 min-1, and 0.1394 min-1 higher than that of bulk g-C3N4 (0.0561 min-1, 0.0648 min-1, 0.0232 min-1), respectively. Density functional theory calculations, and structure-function relationship investigations confirm that the superior catalytic activity of CN-8, modifying the amino position changes the electron cloud distribution, promoting efficient separation of photo-generated electron-hole pairs. This study offers valuable insights for developing eco-friendly and efficient photocatalysts for environmental remediation.