A flash in the pan is something that has a strong start but quickly fails. The idiom is sometimes used in reference to people (e.g., he was just a flash in the pan) and sometimes to things or actions (his success was just a flash in the pan).
The pan in flash in the pan refers to the piece of a musket that holds gunpowder. When a musket is fired with gunpowder in the pan but no bullet, there is a flash and a loud noise, but nothing else happens. It’s also been conjectured that the phrase comes from gold prospecting, where a flash in the pan might cause a moment of excitement followed by disappointment, but all the historical instances of the phrase that we can find refer to musketry.
In these 18th-century examples, the phrase is used literally:
[W]e resolved therefore to keep some of our Pieces uncharg’d, and only prim’d, and causing them to flash in the Pan, the Beasts, even the Lions themselves, would always start, and fly back when they saw it, and immediately march off. [The life, adventures, and pyracies, of the famous Captain Singleton, by Daniel Defoe (1720)]
[I]n the midst of that resolution and bravery, which enflames and animates gallant spirits, comes a chance ball, shot off by one, who, perhaps, fled and was frighted by the very flash in the pan, and in an instant cuts short, and puts an end to the thoughts and life of him, who deserved to have lived for many ages. [1742 translation of Cervantes’s Don Quixote, by Charles Jarvis]
[T]his chief … suddenly seized the gun which his guest had in his hand, cocked it, and … drew the trigger, but it happened only to flash in the pan. [Universal geography formed into a new and entire system, by John Pane (1794)]
Examples of the phrase used figuratively become more common toward the end of the 18th century and into the 19th:
As to Miss De Gray, it is impossible that she can love such a flash in the pan, such a match always lighted, as Medway. [The tutor of truth, by Mr. Pratt (Samuel Jackson) (1784)]
[W]e much question whether Mr. G’s theory of perpendicular extraction will not be found to be a mere flash in the pan. [Article in American journal of dental science by H. Gilbert (1850)]
“Oh! he’s a charlatan, for all that—his tirade is a mere flash in the pan; frothy fools take amazingly at first.” [The eventful epoch; or, The fortunes of Archer Clive, by Nicholas Michell (1846)]
And because muskets are now a thing of the past, the phrase is almost always metaphorical in current use:
Marketing experts say it’s too soon to know whether the New York Knicks’ overnight sensation is a flash in the pan or an enduring superstar. [Los Angeles Times]
This is no flash in the pan: Samsung outsold the iPhone for the whole of 2011. [The Observer]
Facebook, it seems, produces a sharp, blinding flash in the pan, but it does not generate enough heat over an extended period to warm the house. [Daily Beast]