Police say he thought he was meeting up with a 15-year-old girl for sex, instead he made a date with an undercover officer.
State police arrested Walter 'Wally" Edward Hardin over the weekend in Lexington.
Hardin is the deputy judge-executive of Magoffin County.
Undercover officers arrested Hardin in the parking lot of the Harley Davidson in Lexington.
They say Hardin, 28, was charged with unlawful use of electronic means to induce a minor to engage in sexual activities.
Police say Hardin had a series of explicit online conversations with who he thought was a teen girl, but was actually an undercover officer.
Hardin's father, Magoffin County Judge Executive Charles "Doc" Hardin released a statement.
''As a parent, I'm devastated for my son," Charles Hardin said. "As a judge-executive, I am treating him as I would any employee."
He's placed his son on administrative leave without pay pending the outcome of the criminal case.
In Fayette County District Court Monday, Hardin pleaded not guilty to the charge.
If convicted he could spend five years in prison.
Hardin is out of jail on a $10,000 cash bond.
He's due back in court later this month.