Recently, two-dimensional metal-organic frameworks that are photoactive have shown great potential for efficiently converting solar energy into chemical energy. In this work, we successfully synthesized and designed two M2-MOFs ([Cu(L1)((CH3)2NH)]n (Cu-MOF) and [Zn(L1)(CH3)2NH)]n (Zn-MOF), H2L1 = 4,4'-(benzo[c][1,2,5]thiadiazole-4,7-diyl)dibenzoic acid). Structural analysis suggests that the five-coordinated M(II) ion is surrounded by four oxygen ions from two ligands and one nitrogen atom from one dimethylamine molecule. The ligand spacer acts as a bridge between two SBUs and forms a 2D layer with rhomboid windows. These moieties are arranged in a staggered ABAB pattern, which likely aids in exfoliation. The UV-vis diffuse reflectance spectra (DRS) test shows that when the metal center in the MOF framework is replaced with Cu(II) ions, the light absorption range covers 200-1100 nm, which is much larger than the light absorption range of Zn-MOF. Moreover, the photoelectric current, electrochemical impedance spectra (EIS), and Mott-Schottky tests all indicate that Cu-MOF has better photoelectric properties. When applied to the photocatalytic reduction of Cr(VI), Cu-MOF and Zn-MOF can completely reduce Cr(VI) within 100 min under 450 nm LED light irradiation. Under sunlight irradiation, Cu-MOF can completely reduce Cr(VI) within 40 min, achieving the removal of Cr(VI) ions, which is much faster than the rate of Cr(VI) removal by Zn-MOF.