The TVTropes Trope Finder is where you can come to ask questions like "Do we have this one?" and "What's the trope about...?" Trying to rediscover a long lost show or other medium but need a little help? Head to Media Finder and try your luck there. Want to propose a new trope? You should be over at the Trope Launch Pad.
Seems like a type of An Aesop against greed, although it might work as its own distinct subpage.
Could be Hustling the Mark, if the character's initial winnings were deliberately channeled to him to encourage him to bet more and more. Otherwise, it's Sunk Cost Fallacy in a gambling context.
Edited by SharleeSunk Cost Fallacy would be if you lose money, then continue gambling in hopes of winning that money back. The OP is closer to the idea of "Stop while you're ahead" which I don't think we have an exact match for. Know When to Fold 'Em is close, I guess.

A character goes to legal or illegal casino. He starts out winning some money, gets a lot of chips, wins a fortune, but keeps gambling and gambling in hopes of getting more, until he starts losing, and ends up losing everything. Had he said he had enough, he'd go out a rich man.