A former detective sergeant was today jailed for 18 months at the Old Bailey for trying to extort money from former jockey Jamie Osborne.
Judge David Paget told Robert Harrington, 58, his actions were "a very serious perversion of all you stood for all your life".
But he said Harrington had convinced Osborne, who is now a trainer that police officers were corrupt and that he had to pay a bribe in order to get justice.
Harrington, from Reading, Berks, was jailed for 18 months for obtaining £500 by deception from Osborne and 18 months concurrently for corruption. He was found guilty of the charges last month.
He had denied the charges saying he had been acting under-cover as an informer for police officers and had hoped to infiltrate a race-fixing scandal.
Richard Ferguson QC, defending, said Harrington was a policeman in Thames Valley for 27 years and had many commendations for his under-cover work.
He had retired 10 years ago due to fatigue syndrome but had "found the temptation to dabble too strong to resist".
Ferguson said Harrington had to be checked every 15 minutes day and night in jail in case he harmed himself or was harmed by other inmates. Two attempts had already been made to get to him.
"Rarely have I seen a man so shattered," said Ferguson. "He will have to bear the shame."
The court was told that Harrington approached Osborne after he had been arrested in 1998 as part of the police inquiry into horse doping and race-fixing.
Although the jockey was later eliminated from inquiries, Harrington made him believe at the time that he would be implicated unless he gave a police officer £2,000.
Osborne told the court he was "appalled" that he had to buy justice and went to Scotland Yard.
He was fitted with secret recording equipment and his home videoed in order to trap Harrington, who was acting as a private investigator.
At the end of the trial Osborne said: "I am very pleased that this unwelcome chapter in my life has ended.
"Many innocent people have been damaged by this case but thankfully after two years, it is now over and I am free to concentrate on my new career."
He told the court he had never knowingly ridden in a "bent" race or taken money to pull up horses in order to fix bets.
But he sent ripples through the racing community as he revealed he had once been approached to pull up two favourites at the Cheltenham Festival.
Osborne had turned it down because he wanted to make a career in racing but said he thought a man, named in court as a criminal, had been behind the offer of £20,000 which came when he was 19 and broke.
The following day, he named former jockey Dermot Browne as the person who approached him with the bribe.
Browne, who may now be banned for life from British racecourses by the Jockey Club, contacted the defence team from Ireland claiming Osborne had agreed the bribe - and asked for an extra £10,000.
Osborne was summoned back to court to answer the allegation. He was involved in an angry exchange with defence counsel as he called the claims "absolute rubbish, a figment of someone's imagination".