Herein, highly recoverable, and stable, nitrogen-doped Ti3C2Tx-based sensors are developed for ammonia detection at room-temperature. Ti3C2Tx MXene as a room-temperature gas sensor has two main drawbacks: weak recovery and resistance drift. In this work; Ti3C2Tx nano-sheets were derived from the pre-synthesized Ti3AlC2 by selective aluminum etching using HF acid. The sensors fabricated using pristine Ti3C2Tx had high response to-ward polar gases, particularly ammonia. The sensors' response to 100 ppm ammonia was 10%. However, they experienced incomplete recovery and baseline resistance drift. To overcome these problems, we introduced a novel method, in which, before fabricating the gas sensors, the surface of synthesized Ti3C2Tx MXene was modified by a nitrogen treatment strategy. In this method, the MXene layers were doped with nitrogen using NH3 gas at 500 degrees C for 2 h. In nitrogen-doped Ti3C2Tx-based sensors, both recovery and drift problems disappeared. The response of the nitrogen-doped Ti3C2Tx is 3.7% toward 100 ppm ammonia, which is a notable response for a stable, recoverable, room-temperature gas sensor.