Where did Dickens get the idea to write A Tale of Two Cities?

The idea for A Tale of Two Cities originated in two main sources. Always interested in the interaction between individuals and society, Dickens was particularly intrigued by Thomas Carlyle's history, The French Revolution. He saw similarities between the forces that led to the Revolution and the oppression and unrest occurring in England in his own time. Although he supported the idea of people rising up against tyranny, the violence that characterized the French Revolution troubled him.
Dickens was also drawn to the themes inherent in The Frozen Deep, a play that Wilkie Collins wrote and in which Dickens acted. In the play, two men compete for the same woman, Clara Burnham. When she chooses Frank Aldersley over Richard Wardour, Wardour (played by Dickens) vows revenge upon his rival, even though he doesn't know who his rival is. While on an arctic expedition together, the two men get stranded. Wardour discovers that Aldersley is his rival, but instead of leaving him to die, Wardour overcomes his anger and saves Aldersley's life by carrying him to safety. Collapsing at Clara's feet, Wardour dies from his efforts while Clara weeps over him. The idea of Wardour's heroism and sacrifice strongly affected Dickens, and during the course of the play, as Dickens notes in the preface to A Tale of Two Cities, he "conceived the main idea of this story."