If you win the lottery, experts say, you should keep as quiet as possible about it. A lottery winner from Vacaville, California, whose situation escalated to the point where the police had to get involved, just learned that lesson the hard way.

As Lt. Chris Polen of the Vacaville Police Department, who wrote a popular Facebook post about the story, tells CNBC Make It, "We've seen lottery schemes in the past, but nothing of this magnitude."

On Dec. 20, the lottery winner, whom we'll call LW since he has asked local authorities not to reveal his identity, went into a Lucky Supermarket and purchased a $30 scratch-off lottery ticket that he believed to be worth $10,000. LW went home and told his two roommates the good news.

But the next morning, when he took a trip to the Sacramento district office of the California State Lottery to collect his prize, lottery officials turned LW away, saying there was a problem with his ticket.

Later that week, Polen says, LW's 35-year-old roommate Adul Saosongyang went to the lottery office himself with the winning ticket in hand. That kicked off an investigation to confirm that Saosongyang was the actual winner, which is protocol when large prizes are at stake.

When the lottery investigators went to Lucky's to obtain video footage of the purchase, they were told the ticket may have been stolen. That's when they connected with the police.

The investigation determined that Saosongyang allegedly purchased a second scratch-off ticket himself and swapped it with LW's when LW was sleeping.