Dustin Banks, 34, of Neon, is accused of robbing the pharmacy at the Rite Aid store in Jenkins around noon Monday.
Banks approached the pharmacy and asked to pick up a prescription in a different name, police said.
When the clerk told Banks there were no prescriptions listed under that name, he threatened her, police said.
"He told the clerk that he had a gun and would blow her head off if she didn't give him what he wanted," Jenkins Police Chief James Stephens said.
The clerk gave Banks a large amount of narcotics and he left the store, Stephens said.
Shortly thereafter, police caught him at a house less than one mile from the scene of the crime.
"He put some thought, but not a lot into doing this," Stephens said.
The police chief said Banks admitted to the crime and told officers he never actually had a gun when he robbed the pharmacy, but was only pretending to have one.
Police recovered most of the stolen narcotics.
Authorities placed Banks behind bars at the Letcher County Jail.
Banks faces a first degree robbery charge.
"If he's going to rob a pharmacy, there's no telling what he might do," Stephens said. "Not only that, but it protects him because if he was to confront the wrong person and say, 'Hey, I've got a gun and I want something from you, we might be saving his life as well."