C1-xBx samples with 0≤x≤0.60 have been prepared by magnetron sputtering and ball milling. The effect of the boron concentration on the structure and performance of C-B samples as negative electrode materials in lithium and sodium cells were examined by X-ray diffraction and electrochemical methods. XRD experiments of all of the prepared samples show diffraction patterns characteristic of amorphous or nanostructured materials. The boron concentration was found to have a significant effect on the reversible capacity, initial coulombic efficiency and voltage of carbon electrodes. In lithium cells, the reversible capacities increase with increasing boron concentration for both sputtered and ball milled samples, however, the initial coulombic efficiency is lower than 80%. In Na batteries, boron has little effect on the reversible capacity and only increases the irreversible capacity and all electrodes have initial coulombic efficiencies that are lower than 40%. Crystallinity improvement of the C-B alloys structure is required for them to be of practical use in Na or Li cells.