Neutron-rich carbon isotopes have been investigated within the Gamow shell model (GSM) based on a realistic nuclear force. 14 C was chosen as the core in the shell-model calculations of the neutronrich carbon isotopes. The effect from the coupling to the continuum is well considered by using the complex-momentum Berggren representation which treats bound, resonant and continuum states on an equal footing. Using the many-body perturbation theory named the Q-box folded-diagram method, the complex GSM effective interaction was derived from the CD-Bonn interaction. We find that the inclusion of the continuum coupling in the calculation is important in the description of neutron-rich carbon isotopes, especially in reproducing the experimental 1/2 + ground states of 19 C and 21 C. Our calculation indicates a shell closure at N = 16 in the carbon chain, while the N = 14 shell disappears which exists in the next even-Z chain of oxygen isotopes. The calculation suggests that 22 C is the heaviest bound carbon isotope, i.e., the neutron drip line.