A mass of porphyrin sensitizers have been designed and synthesized for dye-sensitized solar cells in previous works, and almost all of them incorporated an electron-rich system as the π-spacer. We here adopted the electron-deficient pyrimidine as an effective π-spacer and combined a cyanoacrylic acid anchoring group, as such a design yields a more bathochromic shift of the spectral absorption of the dye and results in an improved spectral overlap with the solar spectrum and an enhanced light-harvesting efficiency. The result does tally with the performance of sensitizer adsorbing on a semiconductor. From the electron density difference plots of electron transitions, we found that not all electron transitions could make for the effective electron transfer from donor to acceptor groups, which means the sensitizer performance in dye-sensitized solar cells not only relies on the extrinsic spectral absorption intensity but also depends on the intrinsic character of electron movement related to electron excitation. Moreover, the introduction of electron-deficient pyrimidine could affect the energy levels of excited molecules in solution, further affecting the kinds of electron transfer processes. We presented several novel porphyrin sensitizers for comparison on how the π-spacer and anchoring group influence the optical absorption, electron transfer processes, and regeneration of the oxidized dyes, thereby gaining potential dye-sensitized solar cells with highly efficient photo-to-electric conversion performances.