A potentiometric sensor modified with a nanocomposite of montmorillonite sheets decorated with polyaniline nanofibers (MT‐PANI‐NFs) as an efficient electroactive material and tricresyl phosphate (TCP) as a solvent mediator has been developed for the estimation of clomipramine HCl (CLP.HCl). The optimum potentiometric performance of the sensor was achieved by mixing of MT‐PANI‐NFs : TCP : graphene with a ratio of 2.69 : 30.11 : 67.20 (% wt/wt). The sensor exhibited a Nernstian slope of 59.0±0.1 mV decade−1 over the concentration range of 1.0×10−5−1.0×10−2 mol L−1 with a theoretically calculated detection limit of 5.0×10−6 mol L−1. The sensor performance was scrutinized in terms of several factors including thermal stability, pH effect, response time and selectivity. As, it displayed a high thermal stability at various temperature degrees (10–60 °C) with pH independency in the range of 3.5–8.5. Additionally, the developed sensor exhibited a very rapid performance for CLP.HCl detection with a fast response time of 4 s and reflecting a superior selectivity towards CLP.HCl over the other interfering species. SEM (scanning electron microscope) was used as a characteristic tool for the investigation of the proposed graphene sensor surface. Furthermore, the graphene sensor has been efficiently used for CLP.HCl estimation in its pharmaceutical formulations.