He left Dublin for London in 1697, and his play, Love and a Bottle, was performed at Drury Lane theatre in the following year.
The Constant Couple was written when he was only twenty. The unexpected success of the production convinced him to try his hand at writing again with Sir Henry Wildair and The Inconstant, or the Way to Win Him. Farquhar was rapidly gaining a following, and in 1702 married someone he believed would be a wealthy patroness. When it turned out, however, that she was poor too, he set himself to work to support his new family. It was in this period that he produced The Stage Coach and The Twin Rivals. He remained impoverished, and decided to enter the army, which provided material for one of his best-known plays, The Recruiting Officer (1706). Soon afterwards came The Beaux' Stratagem, but the author was in poor health, and died two months after its first production. The last work, completed as he was dying, is considered by many to be Farquhar's best. It was in "The Twin Rivals", however, that his most frequently quoted line, "Necessity, the mother of invention," appears.