<p indent="0mm">The calculations of neutron-rich lithium isotopes have been performed using the Gamow shell model (GSM). In the present work, the shell model basis is generated by solving the one-body Schrödinger equation of the Woods-Saxon (WS) potential in the complex momentum space. The resulting single-particle basis is composed of bound, resonant and non-resonant continuum states, which is also called the Berggren ensemble. Two-body interaction between nucleons in the Berggren ensemble is derived from the realistic nuclear force CD-Bonn potential with the many-body perturbation theory named the <inline-formula id="INLINE7" content-type="pic"><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" display="inline"><mml:mrow><mml:mover accent="true"><mml:mi other="0">Q</mml:mi><mml:mo other="1" stretchy="true">^</mml:mo></mml:mover></mml:mrow></mml:math></inline-formula>-box folded diagrams. The model space consists of the 0p<sub>3/2</sub> bound state, 0p<sub>1/2</sub> resonant state and p<sub>1/2</sub> non-resonant continuum states for neutrons, and 0p<sub>3/2</sub>, 0p<sub>1/2</sub> bound states for protons, respectively. The real and imaginary parts of the complex eigenvalues of the shell model Hamiltonian represent the excitation energies and resonance widths of resonant states, respectively. The p-shell neutron-rich lithium isotopes <sup>7–10</sup>Li have been studied. The results of GSM calculations with CD-Bonn potential are compared with traditional shell model with PWT interaction and GSM with surface Gaussian interaction (SGI). The low-lying spectra and resonance widths of resonant states are discussed, as well as the influences of the continuum states on these observables. In terms of the low-lying spectra of well-bound nuclei, the GSM calculations reproduce the excitation energies of <sup>7–9</sup>Li with good accuracy, except for the states with <sc>4 MeV</sc> or higher energies of <sup>7</sup>Li, which decay through α-particle emission. In the calculation of the unbound nucleus <sup>10</sup>Li, the GSM calculation proves that continuum effect is crucial in its low-lying spectrum. The shell model calculation with PWT interaction of <sup>10</sup>Li overestimates the excitation energies by almost 100%, and by introducing the continuum states, GSM calculation can give more accurate values. Similar phenomenon was also observed in the shell model calculation with USDB interaction of the unbound nucleus <sup>26</sup>O, and was explained by the continuum effect as well. As for the resonance widths, the present calculations extend to higher levels of the studied nuclei compared with GSM calculations with the SGI interaction, and obtain reasonable resonance widths of the resonant states. Though the widths of the α-emitting states of <sup>7</sup>Li cannot be explained by the current GSM, the resonant states among the excited states of <sup>8–9</sup>Li are reproduced in the present work. The GSM calculation with realistic nuclear force also gives correct resonant property of the first 1<sup>+</sup> state of <sup>10</sup>Li, while the GSM calculation with SGI yields a non-resonant state. The excited state of <sup>10</sup>Li with unknown angular momentum and resonance width is also reproduced, which is predicted to be a 0<sup>+</sup> state, with <sc>0.13 MeV</sc> width. In the present work, it is proved that the continuum effect is crucial in shell-model calculations of unbound <sup>10</sup>Li. Through treating the continuum effect microscopically, the GSM calculations with properly renormalized realistic nuclear force can reproduce the observed low-lying spectra and resonance widths of both bound and unbound nuclei with high accuracy. On the other hand, the GSM with realistic nuclear force is based on a relatively small model space, and can thus be used to systems with more valence particles. The GSM with realistic nuclear force is proved to be a promising tool for future research on weakly bound or unbound nuclei.