Natural gas upgrading is industrially important for its utilization, wherein the recovery of heavier alkanes, such as ethane (C2H6) and propane (C3H8) is of certain economic importance. Hydrogen-bonded organic frameworks (HOFs) have shown great potential for separating alkanes. Such a type of porous material is so flexible that it is very challenging to show permanent porosity for gas separation. Here, we report an ultramicroporous hydrogen-bonded organic framework HOF-MTBA for the effective separation of ternary mixtures of C3H8/C2H6/CH4 and binary mixtures of C2H6/CH4 and C3H8/CH4. Upon solvent exchange, HOF-MTBA accommodates dichloromethane molecules as a new phase, which can be readily transformed into an open phase after desolvation. Single-component gas sorption experiments show that HOF-MTBA can exhibit high low-pressure uptakes for C2H6 (0.71 mmol/g, at 10 kPa and 298 K) and C3H8 (1.2 mmol/g, at 5 kPa and 298 K), which are higher than that of many reported adsorbents (0.16–0.73 mmol/g) under the same conditions. The adsorptive selectivities for C3H8/CH4 and C2H6/CH4 are calculated to be 52.7 and 14.0. The breakthrough experiment demonstrates that high-purity CH4 can be obtained from mixtures of C3H8/C2H6/CH4, C3H8/CH4, and C2H6/CH4, respectively.