Silica xerogels doped with Eu3+ ions and co-doped with Eu3+ ions and CdS nanoparticles were prepared using a two-step hydrolysis process. The effect of temperature on photoluminescence properties of Eu3+-doped silica xerogel was investigated. The results showed that the photoluminescence of Eu3+-doped silica xerogel was significantly dependent on the temperature of heat treatment. The study of the photoluminescence of co-doped xerogels showed that the defect emission of silica was weakened due to competition among defects, CdS nanoparticles, and Eu3+ ions.