An optimized and general synthetic strategy based on in-situ iodine modifying of polymeric graphitic carbon nitride is discussed. The as-prepared iodine functionalized g-CN shows enhanced electronic and optical properties, as well as increased photocatalytic activities in an assay of hydrogen evolution.