We have developed a novel ab initio Gamow in-medium similarity renormalization group (Gamow IMSRG) in the complex-energy Berggren framework. The advanced Gamow IMSRG is capable of describing the resonance and nonresonant continuum properties of weakly-bound and unbound nuclear many-body systems. As test grounds, carbon and oxygen isotopes have been calculated with chiral two-and three-nucleon forces from the effective field theory. Resonant states observed in the neutron-dripline 24 O are well reproduced. The halo structure of the known heaviest Borromean nucleus 22 C is clearly seen by calculating the density distribution, in which continuum s-channel plays a crucial role. Further, we predict low-lying resonant excited states in 22 C. The Gamow IMSRG provides tractable ab initio calculations of weakly-bound and unbound open quantum systems. * frxu@pku.edu.cnIntroduction.− Thanks to advanced radioactive beam facilities, loosely-bound and unbound nuclei with extreme neutron-to-proton ratios have been explored in an unprecedented way. The nuclei belong to the category of open quantum systems in which the coupling to the particle continuum profoundly affects the behavior of the system [1, 2]. Many novel phenomena have been observed or predicted in the exotic nuclei, such as halos [3, 4], genuine intrinsic resonances [5, 6] and new collective modes [7,8]. To include the continuum effect, several models have been developed, e.g., the continuum shell model (CSM) [1,9,10], the Gamow shell model [5, 6], the complex coupled cluster (CC) [11,12] and the continuumcoupled shell model [13].Current nuclear theory is pursuing ab initio calculations which are based on realistic nuclear forces and rigorous many-body methods. However, it is always a big challenge to develop an ab initio method to efficiently describe the continuum. As one of powerful ab initio renormalizations of interacting Hamiltonians, similarity renormalization group (SRG) was proposed independently by G lazek and Wilson [14] and by Wegner [15]. Later, Bogner et al. [16, 17] applied the SRG method to softening nuclear forces for ab initio calculations. Recently, the SRG method was developed as a new many-body method in nuclear configuration space, named in-medium SRG (IMSRG) [18, 19]. The IMSRG can directly give the ground-state properties of closed-shell nuclei [18], and as well be used to derive non-perturbative effective Hamiltonians for the descriptions of excited states or open-shell nuclei [20,21]. The IMSRG has been developed further, including multi-reference IMSRG [22], IMSRG using an ensemble reference [23], equation-of-motion IMSRG (EOM-IMSRG) [24,25] and IMSRG merging no-core shell model [26]. The IMSRG has become a powerful and predictive ab initio method. However, all the existing IMSRG calculations are performed in the harmonic oscillator (HO) or real-energy Hartree-Fock (HF) basis (here the real-energy HF means that the HF approach is performed in the HO basis). The HO basis is bound and localized, and hence isolated from the environment of un...