Malcolm Downes was spotted by a resident in the Evergreen Drive area of west Hull, a crown court heard.
Prosecutor Phillip Evans said the man challenged Downes, who was in close proximity to the horses, but the defendant claimed he was urinating and rode away on his bicycle.
The 59-year-old was previously told to rein in his sexual urges and issued an antisocial behaviour order prohibiting him from โentering any field or stable, or any other area which contains equine animals in the Humberside Police areaโ.
Downes narrowly avoided jail in May after he was seen in a field near horses in Orchard Park, north Hull.
But Prosecutor Phillip Evans said a resident took photographic evidence on this occasion in June.
Nigel Clive, defending, said Downes had been on the Better New Me programme, and was planning โto seek libido suppressing drugsโ.
Judge Bury said: โItโs all very well talking about going to the doctorโs and having treatment for your libido, but this is something you should have done years ago, Mr Downes.โ
He was jailed for two years.