A new methodology for the synthesis of some new β‐porphyrin heterocyclic compounds containing nitrogen derivatives 10, 12, 13, 15, 17, 19, 21, 22, 25, 27, and 29 was screened for their cytotoxic activities. Both elemental and spectral analyses were used to confirm the structures of new compounds. Compounds 22, 27, and 21 exhibited very strong activity against the HepG2 cell line. Investigation of the binding between porphyrin 22 and the binding site of telomerase was performed by molecular docking.