Granular thin films consisting of cobalt nanocrystals encapsulated in graphite-like carbon were fabricated by co-deposition of cobalt and carbon with subsequent annealing. The grain size and the crystal structure of the Co-C films depended on the substrate temperature, the carbon concentration, and the annealing temperature. The film deposited with 36 at.% carbon at 200 degrees C consisted of crystalline carbide and hcp cobalt, which transformed into hcp cobalt and graphite-like carbon by annealing at greater than or equal to 300 degrees C. The as-deposited film with a carbon of 46 at.% had an amorphous-like phase and grain sizes of less than or equal to 10 nm. By annealing at greater than or equal to 300 degrees C, the amorphous-like phase transformed into cobalt grains with a random stacking structure encapsulated in graphite-like carbon, and the initial size of the grains was unchanged. The saturation magnetization and the inplane coercivity of these films were also reported.