Molecular dynamics simulations are performed to study the separation of CO2 from flue gas using carbon and boron nitride nanotube membranes. Flue gas is considered as a binary mixture of CO2 and N2 with CO2 molar concentrations of 25 and 50%. Nanotubes of boron nitride and carbon with three different chiralities of (10,0), (14,0), and (18,0) are considered for the investigation of the effect of pore size on gas separation. The permeance of CO2 is found to be higher in the boron nitride nanotube (BNNT) membrane compared to that in the carbon nanotube (CNT) membrane. The estimated CO2 permeance is of the order of 107 GPU in both types of membranes at an initial applied pressure of 50 bar. The gas permeance decreases with a decrease in membrane pore size. The optimum pore size is determined on the basis of gas permeance and the corresponding selectivity data. The free-energy changes for N2 molecules to pass through from the gas phase to the BNNT and CNT membranes are 19.36 and 9.06 kJ/mol, respectively, indicative of a significant barrier for N2 permeance in the case of BNNT. Selectivity analysis also shows that the performance of boron nitride is better than that of carbon nanotube under same conditions. This work suggests that the direct use of boron nitride nanotube as a membrane can be useful for separating CO2 from flue gas with high permeance. Copyright © 2020 American Chemical Society.