In the past decade, many efforts have been made in the ab initio nuclear calculations. Nowadays, the capability of ab initio many-body calculations has reached to the mass number 100 region. The calculation methods which are available for the medium-mass region such as coupled-cluster method, self-consistent Green's function method, and in-medium similarity renormalization (IM-SRG) are usually limited the applications to closed-shell nuclei. The combination of the IM-SRG and conventional shell-model calculation is one of the powerful tools to access the open-shell systems. In this framework, the effective Hamiltonian for the shell-model calculations is obtained through the IM-SRG so that the valence-space Hamiltonian is decoupled with the core and outside of the valence space. So far this framework was mainly applied for the single major-shell valence space problem. However, we obviously need the two (or multi) major-shell effective Hamiltonian to investigate the unnatural parity states, excitation spectra for doubly magic nuclei (16O, 40Ca, ...), and exotic region such as the island of inversion. In this talk, we will present how to calculate the two-major shell-model effective Hamiltonian in the IM-SRG framework and show the numerical results with them.