meso-Tetraphenylporphyrin (TPP) and its two substituted derivatives ( meso-tetrakis(4-cyanophenyl)porphyrin [TPP(CN) 4] and meso-tetrakis(4-methoxyphenyl)porphyrin [TPP(OMe) 4]) were synthesized. Their nonlinear absorption and refraction properties were studied using the Z-scan technique in the picosecond (ps) and nanosecond (ns) regimes. The open aperture Z-scan results reveal that TPP and TPP(CN) 4 display an identical reverse saturable absorption (RSA) character in the ps and ns regimes. While TPP(OMe) 4 exhibits a transition from saturable absorption (SA) to RSA in the ps regime and a typical RSA character in the ns regime. The closed aperture Z-scan results show that TPP(CN) 4 and TPP(OMe) 4 have regular enhancement of the magnitude of nonlinear refraction as compared to their parent TPP in both the ps and ns regimes. In addition, the second-order molecular hyperpolarizabilities ( γ) of these three porphyrins are calculated, and the γ values of TPP(CN) 4 and TPP(OMe) 4 are remarkable larger than that of TPP. The introduction of the electron-withdrawing group CN and the electron-donating group OMe into TPP has enhanced its nonlinear refraction and γ value, and tuned its nonlinear absorption (TPP(OMe) 4), which could be useful for porphyrin-related applications based on the desired NLO properties.