Pristine graphene oxide (GO) sheets were pretreated with polyethyleneimine (PEI) to prepare PEI-modified GO (PEI-GO), which was further inserted with ZIF-8 crystals to form a novel PEI-GO@ZIF-8 nanocomposite for CO2 capture. The good dispersion of PEI and interlayer growth of ZIF-8 within the GO sheets is helpful for high CO2 adsorption. Therefore, the PEI-GO@ZIF-8 nanocomposite show high surface area and enhanced CO2 adsorption capacity. The adsorption capacity of the PEI-GO@ZIF-8 nanocomposite was six times higher than that of the pristine GO and ZIF-8. The CO2/N2 adsorption selectivity was significantly improved due to amine groups loading which provide more sites for CO2 adsorption. The preferential adsorption of CO2 over N2 makes PEI-GO@ZIF-8 nanocomposite be a promising candidate in the field of CO2 capture.