The application of graphitic carbon nitride (g-C3N4) has been restricted in some optoelectronics fields due to its narrow tunable emission region. In order to engineer the optical properties, herein we combine Eu3+:Y2O3 nanocrystals with g-C3N4to control its electronic structure. Surprisingly, with the increasing concentration of Eu3+:Y2O3 nanocrystals, the photoluminescence of Eu3+:Y2O3/g-C3N4 (EYCN) showed a continuous red shift in comparison with pure g-C3N4 from blue to green. In EYCN composites, the Eu3+:Y2O3 nanocrystals as electron donors, can improve the degree of electron delocalization and narrow the bandgap. Importantly, the EYCN composites not only maintain the intrinsic blue-green emission of g-C3N4, but also introduce the red light of Eu3+ ions. Based on the EYCN composites, white light-emitting diode (WLED) were fabricated with a Commission International de L’Eclairage value of (0.3631, 0.3560). This work proposes a new kind of luminescent g-C3N4-based composites, which is expected to broaden its applications in optoelectronics field.