A simple method, suitable for direct space-selective precipitation of semiconducting nanoparticles inside a transparent silica xerogel, is presented. The porous silica monoliths, prepared by the sol-gel method, are first loaded with specific CdS precursors. Then, the samples can be irradiated using either a femtosecond laser to generate the nanoparticles inside the deep volume of the silica matrix or a continuous visible laser to yield a nanocrystal growth under the surface. The resulting CdS nanoparticles are characterized using absorption and Raman spectroscopies, x-ray diffraction analysis and transmission electron microscopy.