Porous graphitic carbon nitride (p-C3N4) was fabricated via simply pyrolyzing treatment of graphitic carbon nitride (g-C3N4). The defects could be introduced into the structure of g-C3N4 by the broken of some bonds, which was beneficial for the generation of electron-hole pairs and restraining their recombination. Compared with g-C3N4, p-C3N4 showed a narrow band gap to promote the utilization of visible light. Furthermore, the porous structure also increased the specific surface area to maximize the exposure of active sites and promote the mass transfer during photodegradation. As a result, the as-reported p-C3N4 exhibited considerably higher degradation efficiency for Rhodamine B (RhB) and Methyl Orange (MO) than that of pristine g-C3N4. Moreover, the photocatalyst showed high durability and stability in recycling experiments.