Efficiently separating sulfur hexafluoride/nitrogen (SF 6 /N 2 ) poses an urgent challenge. Four covalent organic frameworks (COFs) (Re % > 80%) with greater performance in SF 6 /N 2 separation experiment were selected from the CURATED database by high-throughput screening in this paper. XGB was selected among four machine learning models (SVM, RF, GBRT, and XGB) and this model had good fitting effects in terms of both regeneration (Re %, R 2 = 0.809) and ln(S ads ). Relative importance analyses of XGB described that porosity and infinite dilution heat are the most key features for Re % and ln(S ads ). The binding energy, charge density difference, Bader charge, and independent gradient model based on Hirshfeld partition (IGMH) analysis were all calculated to investigate the adsorption mechanisms. GCMC simulations combined with density functional theory calculations revealed that COF-638 exhibited an excellent SF 6 /N 2 separation performance. The probability distribution diagram of the center of mass illustrates the adsorption sites of SF 6 in coadsorption.