Novel nanocomposites consisting of silicon/tin nanoparticles (n-Si/n-Sn) embedded in silicon carbonitride (SiCN) or silicon oxycarbide (SiOC) ceramic matrices are investigated as possible anode materials for Li-ion batteries. The goal of our study is to exploit the large mass specific capacity of Si/Sn (3 579 mAh g −1/994 mAh g −1), while avoiding rapid capacity fading due to the large volume changes of Si/Sn during Li insertion. We show that a large amount (∼30–40 wt.%) of disordered carbon phase is dispersed within the SiOC/SiCN matrix and stabilizes the Si/Sn nanoparticles with respect to extended reversible lithium ion storage. Silicon nanocomposites are prepared by mixing of a polymeric precursor with commercial and “home-synthesized” crystalline and amorphous silicon. Tin nanocomposites, in contrast, are prepared using a single precursor approach, which allows the in-situ generation of Sn nanoparticles homogeneously dispersed within the SiOC host. The best electrochemical stability along with capacities of 600 – 700 mAh g −1 is obtained when amorphous/porous silicon is used. Mechanisms contributing to the increase of storage capacity and the cycle stability are clarified by analyzing elemental composition, local solid-state structures, intercalation hosts and Li-ion mobility. Our work is supplemented by first-principles based atomistic modeling and thermochemical measurements.