The phrase was first used in the Sherlock Holmes story, The Gloria Scott (1893).
We rushed into the captain's cabin . . . there he lay while the chaplain stood with a smoking pistol in his hand.William Safire suggests that this figurative usage dates back to newspaper reports on the Watergate scandal in 1974.