Separating He from CH
4 or N
2 is crucial for natural gas He extraction, a prevailing industrial approach. Herein, molecular simulation and machine learning (ML) were combined to screen 801 experimentally synthesized COFs for He/CH
4 and He/N
2 separation, either by means of adsorption or membrane separation. Top 10 COFs for 4 different gas separation purposes (CH
4/He or N
2/He separation with either adsorption or membrane) were identified respectively. The highest adsorption performance score (APS
mix, defined as the product of working capacity and adsorption selectivity for mixture gas) reached 447.88 mol/kg and 49.45 mol/kg for CH
4/He and N
2/He, with corresponding adsorption selectivity of 115.56 and 30.33. He permeabilities of 1.5 × 10
6 or 1.2 × 10
6 Barrer were achieved for equimolar He/CH
4 or He/N
2 mixture gas separations, accompanied by permselectivity of 5.47 and 11.80 well surpassing 2008 Robeson’s upper bound. Best performing COFs for adsorption separation are 3D COFs with pore diameter below 0.8 nm while those for membrane separation are 2D COFs with large pores. Additionally, ML models were developed to predict separation performance, with key descriptors identified. The mechanism for how COFs’ structure affects their separation performance was also revealed.