Silicon nanocrystals were in situ grown in a silicon nitride film by plasma enhanced chemical vapor deposition. The size and structure of silicon nanocrystals were confirmed by high-resolution transmission electron microscopy. Depending on the size, the photoluminescence of silicon nanocrystals can be tuned from the near infrared (1.38 eV) to the ultraviolet (3.02 eV). The fitted photoluminescence peak energy as E(eV) = 1.16 + 11.8/d2 is an evidence for the quantum confinement effect in silicon nanocrystals. The results demonstrate that the band gap of silicon nanocrystals embedded in silicon nitride matrix was more effectively controlled for a wide range of luminescent wavelengths.