Porphyrins, a class of four-pyrrole nitrogen heterocyclic compounds, have been used in photodynamic cancer therapy. In this study, three distinct pyridine cationic porphyrin photosensitizers were synthesized, each possessing unique side chains containing cyanide groups (H2-P1∼H2-P3). These photosensitizers were prepared using innovative synthetic methods. Subsequently, their theoretical photophysical properties were investigated using density functional theory (DFT). Notably, this research revealed that H2-P2 exhibits the smallest band gap (2.3548 eV) and the lowest energy gap (ΔEST =0.67 eV). Simultaneously, it was confirmed that these three photosensitizers could indeed produce singlet oxygen under illumination using DPBF as a singlet oxygen probe. Additionally, TPP was uesed as a reference to calculate the singlet oxygen yield for all three compounds, with H2-P2 demonstrating the highest yield (ΦΔ = 0.74). The experimental results aligned with the theoretical predictions. The phototoxicity and dark toxicity of the three photosensitizers were further evaluated using the MTT test. Remarkably, H2-P2 exhibited the highest phototoxicity toward HepG2 cancer cells (IC50<9.1 nM), while the lowest dark toxicity toward HUVEC cells (IC50>10 μM). These findings were supported by additional experiments involving cell staining and measurement of reactive oxygen species.