Flue gas poses subsurface direct storage inefficiency due to its high non-CO2 content, while surface separation, desulfurization and denitrification processes require additional equipment and financial resources. To address these challenges, flue gas subsurface component separation and CO2 sequestration within aquifer were proposed in this paper. CO2 migrates notably slower than N2, leading to the gathering of N2 at gas flooding front and the occurrence of CO2 hysteresis during flue gas filtration within the aquifer. The phenomenon, characterized by gas composition deviations from the original injection mole fractions of N2 and CO2, is referred to as the flue gas component separation. Numerical simulation results indicate that the solubility difference between N2 and CO2 is the primary force driving the separation of components, and the asynchronous filtration velocities of the gas and aqueous phases further promote the separation. Thus, simultaneous N2 separation and CO2 storage can achieve by the optimized gas-water alternate injection, and the efficiencies of N2 separation and CO2 storage are inversely correlated. Increasing N2 mole fraction within the injected flue gas enhances the efficiency of N2 separation, while having a slight effect on CO2 storage. Water vapor in flue gas condenses and integrates into the liquid phase, while O₂ component is produced slightly later than N₂, leading to a marginal reduction in N₂ separation efficiency. The synergistic influences of aquifer temperature and pressure exhibit bidirectionality, stemming from the shift between the dominant factors between CO2 dissolution and gas sweep efficiency. Conditions of relatively lower aquifer temperatures and moderate pressures, particularly in medium permeability aquifers, are more favorable for enhancing N₂ separation and CO₂ storage. This proposal method holds the potential for efficient subsurface separation of flue gas components and concurrent underground storage of CO2, thereby contributing to the reduction of greenhouse gas emissions and mitigation of climate change.