Enzyme-like catalytic activity and efficiency of carbon-based nanomaterials are closely linked to their size, heteroatom composition, and structure, and hence the heteroatom regulation needs to be further explored. In this work, a simple and efficient strategy was proposed to develop Cu-doped 2D carbon material C 3 N 4 (Cu-C 3 N 4 -550) with excellent catalytic performance by pyrolyzing precursors of Cu(II) metal−organic gel (MOG) and melamine directly. Due to its sufficient metal active sites and adequate specific surface areas, the as-prepared Cu-C 3 N 4 -550 was endowed with excellent peroxidase-like activity to promote the oxidation of 3,3′,5,5′-tetramethylbenzidine owing to the generation of • OH in the catalytic reaction. It was amazing to find that the peroxidase mimic activity of the prepared Cu-C 3 N 4 -550 has enhanced 32.3-fold compared with bare C 3 N 4 . High peroxidase-like activity of Cu-C 3 N 4 -550 was influenced severely by the addition of antioxidant ascorbic acid (AA), alkaline phosphatase (ALP) as a typical hydrolase could catalyze substrate 2-phospho-L-ascorbic acid into AA, while AA was capable of capturing • OH generated from the catalytic reaction of Cu-C 3 N 4 -550. Hence, a sensitive, selective, and colorimetric method for the detection of ALP was established, the linear concentration of ALP in this colorimetric sensor from 0.4 to 20 U/L was acquired with a low detection limit of 0.32 U/L. This work not only provides ideas for designing enhanced peroxidase-like activity nanozymes in practical biological analysis but also broadens the MOG derivatives and carbon-based nanomaterials in colorimetric applications.