A silicon deposit of various forms was successfully coated on graphite by electrodeposition in molten CaCl2 containing nano-SiO2 as a silicon precursor. The morphologies of the deposited silicon can be tuned from Si nanowires to a dense film by controlling constant electrolysis cell voltage. In addition to controlling electrochemical polarizations, the substrate plays a key role in forming a dense silicon film. By analyzing the interface between the Si film and graphite substrate, a thin transition layer comprising of Si, SiC and C enables the good adhesion of the Si film with the carbon substrate and thereby helps the growth of a dense Si film. Besides the application for photovoltaics, the electrolytic p-type Si film was employed as a binder-free anode for lithium-ion batteries delivering a capacity of over 2500 mAh g−1 in the first 10 cycles and retaining 800 mAh g−1 after 40 cycles. Moreover, this method was applied for coating Si on carbon fibers, which could be a general way to prepare Si with controllable forms and silicon/carbon core-shell structures for functional materials.