We report a novel three-dimensional nitrogen containing carbon foam/silicon (CFS) composite as potential material for lithium ion battery anodes. Carbon foams were prepared by direct carbonization of low cost, commercially available melamine formaldehyde (MF, Basotect) foam precursors. The carbon foams thus obtained display a three-dimensional interconnected macroporous network structure with good electrical conductivity (0.07 S/cm). Binder free CFS composites used for electrodes were prepared by immersing the as-fabricated carbon foam into silicon nanoparticles dispersed in ethanol followed by solvent evaporation and secondary pyrolysis. In order to substantiate this new approach, preliminary electrochemical testing has been done. The first results on CFS electrodes demonstrated initial capacity of 1668 mAh/g with 75% capacity retention after 30 cycles of subsequent charging and discharging. In order to further enhance the electrochemical performance, silicon nanoparticles were additionally coated with a nitrogen containing carbon layer derived from codeposited poly(acrylonitrile). These carbon coated CFS electrodes demonstrated even higher performance with an initial capacity of 2100 mAh/g with 92% capacity retention after 30 cycles of subsequent charging and discharging.