Ideally structured nanocomposite membranes may possess the maximum desired separation properties of both filler particles and the host polymer matrix. To approach this goal in this study, some nanocomposite dense membranes were prepared using Pebax 1657 and polyaniline nanofiber (PANI) with closed structural properties in their different concentrations by applying various ethanol/water solvent mixtures and the solution method casting and solvent evaporation phase inversion. The structural characteristics of the membranes were evaluated using SEM, FTIR (ATR), and XRD analysis and then their CO2 and CH4 permeabilities were measured. The structural analysis revealed that the prepared nanocomposite membranes have defect-free structures and the amorphous PANI nanofibers were dispersed uniformly within the nanocomposite membranes leading to their lower crystallinities. As the nanofiber loading increased in the continuous phase, both CO2 permeability and selectivity of the nanocomposite membranes were increased simultaneously and passed over the 1991 Robeson upper bound limit and approached that of 2008. CO2 permeability and ideal CO2/CH4 selectivity of the nanocomposite membrane loaded by 10 wt. % of the PANI nanofibers were increased to 121.2 Barrer and 33, respectively, revealing 64 and 40 % increments.