Four samples, namely TiC/C, TiN/C, (TiC + FexCy + Fe)/C and TiN/amorphous carbon, have been prepared and investigated. In the former three samples titanium compounds were placed in a carbon matrix, while in the fourth one TiN was surrounded by an amorphous carbon. The samples have been characterized by XRD, SEM, and electron diffraction spectroscopy. The crystallite sizes and lattice parameters of TiC and TiN have been determined by the X-ray diffraction method. XRD measurements have shown that the lattice constants of nanosized samples were smaller than those of microsized samples. An essential influence of the carbon matrix during the crystallization process on the lattice parameters and grain size was observed. Electron paramagnetic resonance (EPR) measurements of the samples were carried out at room temperature. A narrow EPR absorption line has been recorded for the TiC/C, TiN/C, and TiN/amorphous carbon samples, whereas for the (TiC + FexCy + Fe)/C sample a ferromagnetic resonance spectrum, mainly of ?-Fe and cementite Fe3C, has been recorded. The narrow resonance EPR line is explained by carrier motion - free electrons in the case of the TiN/C sample and holes (carbon vacancies) in the case of TiC/C and TiN/amorphous carbon samples - which could lead to the creation of the pseudogap state in TiCx or TiNx compounds.