The local structure of TiBC and amorphous carbon (a-C) nanocomposite films (TiBC/a-C) was correlated with their optical and electrical properties. TiBC/a-C films with increasing C content were deposited by magnetron co-sputtering from TiC:TiB2 (60: 40) and graphite targets. Chemical composition is determined by electron energy-loss spectroscopy. Grazing incidence X-ray diffraction reveals that the microstructure of the films is amorphous with small nanocrystallites emerging by increasing the C content that could be attributed to the formation of ternary (TiBxCy) or mixed binary (TiB2 and TiC) phases. Further information was then obtained by studying the chemical bonding by measuring the near-edge fine structure (NES) by electron energy-loss (B K-, C K-, and Ti L-edges) and X-ray absorption (B K-and Ti L-edges) spectroscopies. The NES analysis indicates the formation of a nanocrystalline ternary TiBxCy compound concomitant with the segregation of an a-C phase as the carbon content is increased. The optical properties were studied by spectroscopic ellipsometry and the electrical resistivity was measured by the Van der Pauw method between 20 and 300 K. The films continuously lose their metallic character in terms of optical constants and resistivity with increasing carbon content. Theoretical fitting of the electrical properties using the grain-boundary scattering model supported the formation of a nanocomposite structure based on a ternary TiBxCy phase embedded in a matrix of a-C. The electron transport properties are mainly limited by the high density of point defects, grain size, and transmission probability.