Three different types of organic–inorganic hybrid materials formed by trivalent lanthanide (Ln3+ = Eu3+, Tb3+) complexes covalently grafted to silica-, titania-, or silica/titania-based hosts have been prepared and fully characterized. Since the organic ligand 2-sulfanylpyridine-3-carboxylic acid (SPC), a derivative of nicotinic acid, exhibits three potential binding sites (pyridine N, sulfhydryl S and carboxylic O), the multifunctional precursor can be prepared through the reaction of the carboxylic group with titanium alkoxide and the modification of the sulfhydryl group with silane crosslinking reagents. Thus, the organic–inorganic hybrid materials covalently grafted with Eu3+ or Tb3+ complexes are synthesized through coordination of the Ln3+ ions with the heterocyclic group in the multifunctional precursor during the sol–gel process. The obtained hybrid materials were characterized by X-ray diffraction (XRD), scanning electron microscopy (SEM), differential scanning calorimetry (DSC), thermogravimetric analysis (TG), Fourier transform infrared (FTIR) spectroscopy, and photoluminescence (PL). The detailed PL studies showed that, compared with the titania-based hybrid materials (denoted as Ln–SPC–Ti), the silica- and silica/titania-based hybrid materials (denoted as Ln–SPCSi and Ln–SPCSi–Ti, respectively) exhibited higher luminescence intensity and emission quantum efficiency.