A cyclical process for the production of a nitrogen fraction with a purity ≥ 95 mol%, on the one hand, and of a fraction enriched in hydrocarbon, on the other hand, from a feedstock comprising nitrogen and a hydrocarbon, the hydrocarbon being propylene, each cycle comprising the following stages: i) bringing said feedstock into contact with an adsorbent bed provided with a feed end and with a production end and containing a solid adsorbent chosen from porous hybrid solids, said contacting operation being carried out under a pressure P 1 ≥ 0.1 MPa and a temperature T 1 ≥ 0°C; ii) recovering, at the production end of the adsorbent bed, a first nitrogen fraction with a purity ≥ 95 mol%; iii) depressurizing the adsorbent bed cocurrentwise down to a pressure P 2 < P 1 where P 2 ≥ 0.1 MPa, so as to recover, at the production end of the adsorbent bed, a second fraction of nitrogen with a purity ≥ 95 mol%; iv) depressurizing the adsorbent bed countercurrentwise down to a pressure P 3 < P 2 where 0.05 MPa ≤ P 3 ≤ 0.006 MPa, so as to desorb the hydrocarbons from the bed and to recover, at the feed end of the adsorbent bed, a first fraction enriched in hydrocarbon; v) purging the adsorbent bed countercurrentwise using a nitrogen fraction with a purity ≥ 95 mol% under the pressure P 3, so as to recover, at the feed end of the adsorbent bed, a second fraction enriched in hydrocarbon; vi) repressurizing the adsorbent bed countercurrentwise using the nitrogen with a purity ≥ 95 mol% or with the feedstock up to the pressure P 1; in which said adsorbent has a dynamic capacity with regard to the hydrocarbon of at least 3 mmol/g between 0.25 MPa and 0.05 MPa at 50°C and a dynamic capacity with regard to the nitrogen of less than or equal to 0.50 mmol/g between 0.25 MPa and 0.05 MPa at 50°C, characterized in that, before carrying out the depressurization stage iv), a portion of the first fraction enriched in hydrocarbon is recycled in the adsorbent bed via the feed end, so as to saturate the bed with hydrocarbon and to recover, on conclusion of stage iv), a fraction enriched in hydrocarbon with a purity ≥ 90 mol%.. i) bringing said feedstock into contact with an adsorbent bed provided with a feed end and with a production end and containing a solid adsorbent chosen from porous hybrid solids, said contacting operation being carried out under a pressure P 1 ≥ 0.1 MPa and a temperature T 1 ≥ 0°C; ii) recovering, at the production end of the adsorbent bed, a first nitrogen fraction with a purity ≥ 95 mol%; iii) depressurizing the adsorbent bed cocurrentwise down to a pressure P 2 < P 1 where P 2 ≥ 0.1 MPa, so as to recover, at the production end of the adsorbent bed, a second fraction of nitrogen with a purity ≥ 95 mol%; iv) depressurizing the adsorbent bed countercurrentwise down to a pressure P 3 < P 2 where 0.05 MPa ≤ P 3 ≤ 0.006 MPa, so as to desorb the hydrocarbons from the bed and to recover, at the feed end of the adsorbent bed, a first fraction enriched in hydrocarbon; v) purging the adsorbent bed countercurrentwise using a nitrogen fraction with a purity ≥ 95 mol% under the pressure P 3, so as to recover, at the feed end of the adsorbent bed, a second fraction enriched in hydrocarbon; vi) repressurizing the adsorbent bed countercurrentwise using the nitrogen with a purity ≥ 95 mol% or with the feedstock up to the pressure P 1;