Diatomite, a natural clay mineral, is mainly composed of silica and contains a large number of fine microscopic pores. In the present work, a series of porous Si/C composites are successfully synthesized by employing diatomite as a raw material, followed by low temperature magnesiothermic reduction, impregnation and carbonization of phenolic resin. The obtained Si/C composites are consisted of porous Si coated with a 15 nm thick amorphous layer of carbon. Porous Si/C composites with different ratios of Si and C are investigated as anode materials for Li-ion batteries. The porous Si/C composite containing 33% carbon exhibits the highest reversible capacity of about 1628 mAh g−1 at the first cycle with excellent capacity retention in the following cycles. Moreover, the porous Si/C composites display the excellent rate performance at high current densities such as 1 and 2 A g−1. The optimum electrochemical performance could also be tuned by varying the proportions of porous Si and carbon precursors during the preparation process. The results indicate that the natural pore structures of Si and C are conducive to the electrochemical performance and clay mineral diatomite could be considered as a promising raw material for Si/C composites for lithium-ion batteries.