I don't think so! It's not in either Chambers or Brewers, but I have found it in Wiktionary: apparently it comes from the practice of giving cigars as prizes at carnivals in the US in the 19th Century. This phrase would be said to those who failed to win a prize.