By molecular dynamics simulation, the chemical vapor deposition of amorphous carbon onto graphite and diamond surfaces was studied. In particular, we investigated the effect of source H/C ratio, which is the ratio of the number of hydrogen atoms to the number of carbon atoms in a source gas, on the deposition process.In the present simulation, the following two source gas conditions were tested: one was that the source gas was injected as isolated carbon and hydrogen atoms, and the other was that the source gas was injected as hydrocarbon molecules. Under the former condition, we found that as the source H/C ratio increases, the deposition rate of carbon atoms decreases exponentially. This exponential decrease in the deposition rate with increasing source H/C ratio agrees with experimental data. However, under the latter molecular source condition, the deposition rate did not decrease exponentially because of a chemical reaction peculiar to the type of hydrocarbon in the source gas.