We have studied neutron-rich carbon isotopes in terms of the shell model employing a realistic effective Hamiltonian derived from the chiral N 3 LOW nucleon-nucleon potential. The single-particle energies and effective two-body interaction have both been determined within the framework of the time-dependent degenerate linkeddiagram perturbation theory. The calculated results are in very good agreement with the available experimental data, providing a sound description of this isotopic chain toward the neutron drip line. The correct location of the drip line is reproduced.