Metal fluoride cathode materials, which are cost-effective and have large theoretical capacities, can be used in lithium-ion batteries (LIBs) to reduce the cost of these batteries. However, they have intrinsically low electrical conductivity and high overpotential. Herein, we report a bottom-up approach to synthesize NiF2/porous carbon (NPC) nanocomposites using an ammonium fluoride (NH4F) treatment. In this process the nickel precursor in the porous carbon is fluorinated under the solventless condition without hazardous reagents; thus, lower toxicity and higher yield compared to those of traditional methods can be achieved. Furthermore, we demonstrate the formation mechanism of NiF2 according to the reaction temperature. As a cathode material for LIBs, NPC nanocomposites exhibit an outstanding initial reversible capacity of 830 mAh g−1 at a current density of 50 mA g−1 and excellent rate performance of 487 mAh g−1 at a high current density of 1000 mA g−1. These capacities are much larger than those of the intercalation-based cathodes. The successful preparation of NPC nanocomposites may facilitate the use of metal fluorides as LIB cathode materials.