g-C3N4 was prepared by recrystallization and calcining the mixture of urea and thiourea. The photocatalytic activity of the CN-X is much higher than that of CNU and CNT, respectively. The optimal thiourea's mass ratio in the starting mixture is about 2.44%.