In this study, for the first time, a comprehensive mathematical modeling of the optimal conditions for the gas hydrates formation of hydrogen sulfide (H2S) and carbon dioxide (СО2) was carried out with the aim of them removing from natural gas. The study was carried out on a model gas mixture close to the natural gas composition: CH4 – C2H6 – С3Н8 – n-С4Н10 – СО2 – H2S – N2. A temperature range of 268.15–283.15 К and a pressure range of 2.00–8.00 MPa were investigated. The efficiency was assessed based on the gas hydrate distribution coefficients. It was found that the gas hydrate extraction of H2S is more significantly affected by the concentration of H2S in the initial gas mixture. The gas hydrate extraction of СО2 is more significantly affected by the temperature and pressure of the gas separation unit. The maximum gas hydrate distribution coefficient of H2S is 42.05 at T = 268.15 K, p = 8.00 MPa. The maximum gas hydrate distribution coefficient of СО2 is 0.49 at T = 283.15 K, p = 8.00 MPa. Due to the small amounts of CO2 entrapped in gas hydrates, a scheme that combines a multi-stage hydrate-based and membrane technology has been suggested to purify natural gas further.