A Camelot employee confessed to a former partner he conspired with his builder to take part in a £2.5 million National Lottery fraud, a court heard.
Giles Knibbs, who has since taken his own life, told John Coleyshaw he conspired with Edward Putman to cheat Camelot of an unclaimed jackpot.
Mr Putman, 54, from Hertfordshire, has denied committing fraud by false representation.
He allegedly claimed £2,525,485 with a faked ticket in 2009.
Giles Knibbs worked in fraud detection at Camelot in Watford.
Mr Coleyshaw told St Albans Crown Court that Mr Knibbs, with whom he had a five-year relationship, told him he had come across details of unclaimed lottery tickets and he and Mr Putman agreed on a scam and would split the money.
But after Mr Putman claimed the prize in 2009, the defendant had not paid him his agreed share of the fraudulent winnings.
“He said he received some money, but not the agreed amount,” Mr Coleyshaw said.
He said he was very worried about Mr Knibbs, who had been arrested after Edward Putman had made a complaint about him to the police.
Mr Knibbs told Mr Coleyshaw “it looks like I am going down for 10 to 15 years for blackmail”, the court heard.
“For want of a better word, he had been “shafted” by someone he considered to be a good friend,” Mr Coleyshaw said.
“He was extremely distressed. I had never seen him so distressed in all the time I had known him.”
Mr Knibbs, who lived with a new partner in Bricket Wood, died at Ivinghoe Beacon in Buckinghamshire on 5 October 2015.
Earlier, the jury heard Mr Putman, of Station Road, Kings Langley, claimed the prize from the 11 March 2009 draw on 28 August, just before the six-month deadline passed to claim the win.
He came forward with the “winning” ticket, which had been bought in the Co-op at St John’s Road, Worcester.
Camelot verified the ticket was genuine and Mr Putman collected the jackpot.
The trial continues.