Mg(II)-5,15-diphenylporphyrin, Mg(II)-5,10,15,20-tetraphenylporphyrin, Mg(II)-2,3,7,8,12,12,13,17,18-octaethylporphyrin and Mg(II)-5,10,15,20-tetra-(pentafluorophenyl)porphyrin were obtained using the coordination reaction of the corresponding porphyrins with magnesium acetate in a boiling dimethylformamide–ethylene glycol mixture. The complexation of β-octachloro-5,10,15,20-tetra(pentafluorophenyl)porphyrin with magnesium acetate in dimethylformamide already at room temperature led to the formation of the corresponding Mg(II)-porphyrinate. A facile method for the preparation of magnesium complexes with magnesium chloride in dimethylformamide has been proposed as an example of the metal exchange reaction of Cd(II)-5,10,15,20-tetraphenylporphyrin and Cd(II)-2,3,7,8,12,13,17,18-octaethylporphyrin. The synthesized compounds were identified by UV-Vis, NMR spectroscopy,mass spectrometry and elemental analysis methods. The fluorescence properties of Mg-porphyrins in acetone have been studied. The values of fluorescence quantum yields and Stokes shifts of the studied compounds were calculated. The influence of the nature of substituents on the fluorescence characteristics of Mg-porphyrins was evaluated. The coordination reaction of β-octachloro-5,10,15,20-tetra(pentafluorophenyl)porphyrin with magnesium acetate in dimethylformamide was studied by spectrophotometric method. The kinetic parameters were calculated and the stoichiometric mechanism of the studied reaction has been proposed.