Robespierre and the Jacobins massively overreached during the Terror. The Terror was getting rapidly out of hand, destroying the lives of many who, by no stretch of the imagination, could reasonably be described as hostile to the Revolution. It seemed to many in the National Convention that no one was safe from the guillotine.
Furthermore, there were tensions within the Committee of Public Safety regarding the future direction of events. Robespierre, for his part, remained utterly convinced of his own unimpeachable integrity as well as the moral purity of the Terror. Other members of the Committee, such as Carnot, resented Robespierre and what they saw as his growing dictatorship. In due course, Robespierre found himself caught in the middle between radicals and moderates. With growing economic problems and public unrest, the difficulties assailing the revolutionary government were increasing by the day.
Also, as the Revolutionary Army continued to chalk up an impressive string of victories, the threat of foreign invasion receded sharply. Under those conditions, it became increasingly difficult for the Jacobins to justify their reign of terror. Inside the National Assembly, the Montagnards, the large mass of deputies who had kept their heads down during the Terror, finally came to life, whipped up into action mainly by men such as Barras, himself a deputy, who convinced many of his colleagues that their names were on a death list drawn up by Robespierre.
Robespierre unwisely confirmed such fears with an ill-judged speech in the Convention on 9 Thermidor (a month in the French Revolutionary calendar). In it, he detailed the existence of growing plots and conspiracies against the regime and spoke of an unnamed group of traitors in the Convention. The instinct for self-preservation among the deputies now kicked in, stiffening their resolve to overthrow Robespierre and his despotic regime. Robespierre's speech was shouted down by a hostile Convention, which accused him of being a tyrant.
Robespierre was finally done in by the narrowness of his political power base. The Jacobin Club and the more radical Communes rallied to his defense, but the Convention had now declared him a tyrant and an outlaw. Crucially, it had the force of arms on its side. Eventually, Robespierre and a number of his most radical followers went to the guillotine. The Committee of Public Safety was replaced by the Directory, a five-man executive which proceeded to carry out its own repressive agenda against opponents on the Left, the so-called White Terror.