In this study, a series of zinc and magnesium metal porphyrins are synthesized, and the characteristics of metal porphyrins are discussed by electrochemical methods. In this paper, we will first discuss the spectral changes of a series of metal porphyrins and pyridine and imidazole ligands by spectral titration, and calculate the formation constants to observe the differences of different complexes. The cyclic voltammetry was used to observe the difference in oxidation potential between porphyrins and metal porphyrins. The main reason is that when the porphyrin ring was oxidized, its structure will start to twist. When different metals are added, the degree of distortion of the porphyrin ring will be different. Phenomenon and discuss the difference, then titrate the pyridine and imidazole ligands to observe the electrochemical performance of the complex.