A 56-year-old Bloomington man’s unorthodox scheme for funding an early retirement landed him in Hennepin County District Court on Wednesday, charged with theft from his longtime employer.

Thyvuth Lin allegedly stole more than $1 million of hearing aids and equipment after learning that he would be laid off from the Plymouth company he’d been with for 25 years.

“This case is special because of the number of zeros in the cost of the merchandise he stole,” County Attorney Michael Freeman said.

In January 2012, Lin learned he would lose his job at Siemens Hearing Instruments Inc.’s Rexton division in Plymouth in six months, according to charges. That’s when he started stealing hearing aids, chargers and remotes, some valued at $2,000, authorities say.

Lin sold them on eBay for a cut rate, getting help from a relative because he didn’t know how to use computers, the criminal complaint said.

The scheme began to unravel when Costco began receiving calls, usually involving warranties, about hearing aids. When Costco employees checked the serial numbers, they discovered that those hearing aids had been sent back to Rexton and were not supposed to be sold again, the complaint said. The customers said they had purchased the hearing aids on eBay.

A Rexton manager went on eBay and found that someone named Johny20122012 was selling hearing aids. Further investigation by the company found that dozens of hearing aids, chargers and remotes were missing from the factory floor and from returns. One manager ordered hearing aids from “Johny,” and the return address was traced to a house where Lin and a 20-year-old relative, Laden Hot, lived, the complaint said.

When police from Bloomington and Plymouth searched the house Saturday, they found large amounts of cash and boxes of hearing aids, batteries and components, the complaint said. Reston’s human resources manager prepared a list of the stolen merchandise, which totaled $1,069,275.09, the charges said.

Lin told police that he stole the products when he learned that he would be laid off and that he had planned to earn his living selling them, the complaint said. He was charged with felony theft over $5,000. He made his first court appearance Wednesday. No bail was set or required.

Hot, who wasn’t a Rexton employee, also was charged with felony theft. Authorities say that he missed an initial court appearance last month and that a warrant has been issued for his arrest.