The two earliest occurrences of the phrase to appear in a Google Books search, are from the 1740s, and both f them refer explicitly to "throwing away good money after bad." From Colley Cibber, An Apology for the Life of Colley Cibber (1740):
Upon a Run of good Audiences, he [a stage "Menager"] was more frighted to be thought a Gainer, which might make him accountable to others, than he was dejected with bad Houses, which a worst, he knew would make others accountable to him : And as, upon a moderate Computation, it cannot be suppos'd, that the contested Accounts of a twenty Years Wear, an Tear, in a Play-house, could be fairly adjusted by a Master in Chancery, under four-score Years more, it will be no Surprize, that by the Neglect, or rather the Discretion of other Proprietors, in not throwing away good Money after bad, this Hero of a Menager, who alone supported the War, should in time so fortify himself by Delay, and so tire his Enemies, that he became sole Monarch of his Theatrical Empire, and left the quiet Possession of it, to his Successors.
And from Publicus, "A Letter from a Freeholder to a Member of Parliament," in The Gentleman's Magazine (1748):
Amongst the great number of persons that have, by several acts, been discharged, I never could recover any part of the debt they ow'd me, nor have I ever heard of any other person that has received any part of his debt ; but, on the contrary, the debtors have either spent, or collusively and fraudulently convey'd away their estates and effects ; so that the creditors have been left without redress or satisfaction, to repent their throwing away good money after bad, and been forced patiently to suffer the insults of the debtors after discharged.
The notion here explicitly involves discarding "good money" (money still in one's possession, and therefore still capable of being put to worthwhile use) after having, in effect, discarded money that is now "bad" (no longer in one's possession, and therefore—if nothing of value came of it—wasted).
As FumbleFingers notes in a comment added to Josh61's answer, the first instance in Google Books search results of the more common modern wording "throw[ing] good money after bad" occurs in The London Chronicle for the Year 1763 (1763) [snippet window does not show the cited wording]:
He does not care to throw good money after bad, as the saying is ...