The phrase the ghost walks means there is money in the treasury, the salaries are forthcoming.
It originated in theatrical slang; the earliest instance that I have found is from Theatrical News, in The Atlas. A General Newspaper and Journal of Literature (London) of Sunday 29th May 1831:
On Saturday the actors at Drury Lane were struck with horror to find that no “ghost walked;” that is, that the treasury was shut. It appears that 800l. were wanted by the treasurer. Captain Polhill would pay down no more than 400l., according to the terms of his agreement with Mr. Lee. This led to a secession on the part of the latter gentleman from the concerns of the theatre. The deed of separation was regularly drawn up and signed, the partnership dissolved, and Captain Polhill remains sole manager of Drury Lane. There were various accounts of the supposed cause of this disagreement, and it was said that the rival queens of Drury had, as in days of yore, by their contentions, frightened Alexander from the throne. The cause we have stated first, however, a mere matter of business, is the real one.
Albert Barrère and Charles Godfrey Leland defined the phrase in A dictionary of slang, jargon and cant: embracing English, American, and Anglo-Indian slang, pidgin English, tinkers’ jargon and other irregular phraseology (Edinburgh, 1889):
Ghost walking (theatrical), a term originally applied by an impecunious stroller in a sharing company to the operation of “holding the treasury,” or paying the salaries, which has become a stock facetiæ amongst all kinds and descriptions of actors. Instead of inquiring whether the treasury is open, they usually say—“Has the ghost walked?” or “What! has this thing appeared again?” (Shakspeare).
(Commercial), in large firms, when the clerk whose duty it is goes round the various departments paying wages, it is common to say the ghost walks.
These authors wrote that the phrase refers to the English poet and playwright William Shakespeare (1564-1616), and, indeed, it alludes to the following passage from The Tragicall Historie of Hamlet Prince of Denmarke (Quarto 1, 1603), in which Horatio addresses the ghost of Hamlet’s father:
Speake to mee.
If thou art priuy to thy countries fate,
Which happly foreknowing may preuent, O speake to me,
Or if thou hast extorted in thy life,
Or hoorded treasure in the wombe of earth,
For which they say you Spirites oft walke in death, speake
to me, stay and speake, speake.
Robert Hendrickson gives a ludicrous explanation in The Facts On File: Encyclopedia of Word and Phrase Origins (4th edition – New York, 2008)—interestingly, he provides neither the date nor the location of his anecdote:
A company doing Hamlet hadn’t been paid for a month or so. When during a performance Hamlet exclaimed “Perchance ’twill walk again,” the actor playing the ghost answered from the wings, “No, I’ll be damned if the ghost walks any more until our salaries are paid.” That night the salaries were finally paid.
It is typical of folk etymologies that stories have to be made up in order to support false theories. I have exposed several other folk etymologies, in particular in the following articles:
– origin of ‘Indian summer’ and French ‘été sauvage’
– The usual explanation of ‘Hobson’s choice’ is fallacious.
– the authentic origin of ‘to rain cats and dogs’
– origin of ‘once in a blue moon’
– Kilkenny cats
– the authentic origin of ‘a pretty kettle of fish’
– to buy a pig in a poke vs. to let the cat out of the bag
– origin of ‘point-blank’
– between the devil and the deep blue sea
– meaning and origin of ‘the devil to pay’
– origin of ‘to turn a blind eye’
– to buttonhole.