School caretaker Geoffrey McLukie kept the money, along with cash he won on horse races, in a savings account. But he started claiming Job Seekers Allowance in May, 2008.
The move came after he was being made redundant from his six-month job as a mechanic.
Evidence later came to light and an investigation was launched by the Department for Work and Pensions, Walsall Magistrates Court heard yesterday.
It was discovered McLukie, aged 52, had been overpaid by £12,215. In an interview, he said he should not have to declare the lottery win because it was for his future security.
Mr Nick Baker, prosecuting, told the court: "He claimed Jobseeker's Allowance from 2008. He said he was unemployed and had capital under the prescribed limit.
"But evidence was gathered by investigators that he had capital and had failed to declare it." McLukie, who lives with his mother in Remington Road, Beechdale, was interviewed by the DWP in February 2012.
Mr Baker continued: "He said he understood the rules and that he had over £16,000. He stated he had not considered that to be savings."
The court heard from a probation officer that McLukie currently works 10 hours a week as a school caretaker in the area.
McLukie admitted falsely making a statement to obtain a benefit. He was given a 12-month community order and asked to complete 150 hours of unpaid work. He must also pay costs of £100.