A carbon-dioxide-responsive organic–inorganic nanocomposite membrane based on a through-hole anodic aluminum oxide (AAO) template was constructed. The composite was prepared via a surface-initiated reversible addition–fragmentation chain-transfer (SI-RAFT) polymerization strategy to achieve the grafting of poly(methyl methacrylate-co-2-(diethylamino)ethyl methacrylate) brushes on the AAO membrane. The grafted polymer chain length could be controlled based on the feed ratio between the free chain transfer agent (CTA) and reactive monomer, e.g., methyl methacrylate and 2-(diethylamino)ethyl methacrylate, resulting in a membrane that features adjustable water permeability. Importantly, the membrane pore size and surface wettability could be switched from hydrophobic to hydrophilic upon the introduction of carbon dioxide and nitrogen gases. This allowed for the nanocomposite membrane to be utilized for controlled water flux and oil/water emulsion separation. The simple fabrication methodology as well as sustainable gaseous stimulus will be useful for the construction of future smart membranes.