To apply hydrotalcites more effectively to the problem of dye wastewater, the effects of divalent metal ions on the structure and stability of hydrotalcites, especially on their photocatalytic activity, were compared. In the present study, M/Cr hydrotalcites (M3Cr-CO3-LDHs) (in which M = Mg, Co, Ni, Cu, Zn), where the M/Cr molar ratio was 3, were prepared by the co-precipitation method. The structures and properties were characterized using powder X-ray diffraction (XRD), Fourier-transform infrared spectroscopy (FTIR), thermogravimetric-differential thermal analysis (TG-DTA), and UV-Visible diffuse reflectance spectroscopy (UV-Vis DRS). The results showed that five kinds of M3Cr-CO3-LDHs were synthesized successfully, and the layered structure of the samples obtained was regular and the crystal phase was single. When methylene blue (MB) solution was exposed to ZnCr-CO3-LDHs, H2O2, and visible light irradiation, more than 90.67% of the methylene blue (MB) was removed after 140 min. The photocatalytic activity of the samples was in the order: Co3Cr-CO3-LDHs > Mg3Cr-CO3-LDHs > Cu3Cr-CO3-LDHs > Zn3Cr-CO3-LDHs > Ni3Cr-CO3-LDHs. The results of a catalytic mechanism study showed that photocatalytic degradation of MB involved a demethylation reaction, with the reactive species containing •O2-, •OH, and h+.