In this study, mpg-C3N4/Ag composites of surface plasrnon resonance structures were fabricated to improve the photocatalytic and photoelectrocatalytic activities of g-C3N4 via photo-assisted reduction method, which were characterized by XRD, EDS, XPS, FT-IR, FE-SEM, TEM, DRS and BET. The photocatalytic and photoelectrocatalytic activities were evaluated by the degradation of methylene blue (MB) and the oxygen reduction experiment under visible light. The results showed the photocatalytic and photoelectrocatalytic activities were dependent on the weight ratio of Ag and the optimum photocatalytic activity of mpg-C3N4/Ag at a weight ratio of 3% is almost 3 times as high as that of mpg-C3N4. Additionally, mpg-C3N4/Ag exhibited a significantly enhanced oxygen reduction performance under visible light. The limit current density was increased about 2 times by the modification of Ag nanoparticles, compared with that of pristine mpg-C3N4. Finally, based on the first principle, the enhancement mechanism of the photocatalytic and photoelectrocatalytic activities was discussed by the calculation on the band structure and density of states in the mpg-C3N4/Ag composites. The appropriate amount of Ag modification would cause the surface plasmon resonance effect, which improved the photocatalytic, photoelectrocatalytic, and oxygen reduction activities of mpg-C3N4. (C) 2016 Elsevier B.V. All rights reserved.