In this work, we report the synthesis of highly stable trifluoroacetic acid (TFA) modified Nb2CTx MXene for the electrochemical detection of anti-tuberculosis drug rifampicin (RIF). The modification of Nb2CTx with TFA enhances the colloidal stability of Nb2CTx and the TFA@Nb2CTx based sensor was able to detect RIF from 100 pM to 1 μM with a limit of detection of (LOD) of 4.8 pM. The developed sensor exhibited superior selectivity in addition to its practical applicability by using pharmaceutical drug sample and human serum samples. This work explores a novel engineering strategy to develop highly stable and aggregation free Nb2CTx MXene for different applications. © 2022 Elsevier B.V.