Applying a design of experiments methodology to molten salt synthesis of nanoporous carbons enables inverse design and optimization of N‐rich carbon adsorbents with excellent CO2/N2 selectivity and appreciable CO2 capacity for carbon capture via swing adsorption from dilute gas mixtures, such as natural gas combined cycle flue gas. This data‐driven study reveals fundamental relationships between the synthesis conditions, physicochemical properties, and achievable selective adsorption performance of N‐rich nanoporous carbons derived from molten salt synthesis for CO2 capture. Taking advantage of size‐sieving separation of CO2 (3.30 Å) from N2 (3.64 Å) within the turbostratic nanostructure of these N‐rich carbons, while limiting deleterious N2 adsorption in a weaker adsorption site that harms selectivity, enables a large low‐pressure CO2 capacity (0.73 mmol/g at 30.4 Torr and 30°C) with noteworthy concurrent CO2/N2 selectivity (SIAST = 246, adsorbed phase purity = 91%) from a simulated gas stream with only 4% CO2. This study reveals general structure‐function relationships of selective CO2 adsorption by nanoporous carbon adsorbents. Optimized N‐rich porous carbons, with good physicochemical stability, low cost, and moderate regeneration energy, can achieve performance for selective CO2 adsorption that competes with other classes of advanced porous materials, such as chemisorbing zeolites and functionalized metal‐organic frameworks.This article is protected by copyright. All rights reserved