Police say Joshua Armolt, of Pa., robbed the Shepherdstown Pharmacy on 7670 Martinsburg Pike around 10:30 a.m.
Sgt. Victor Lupis says Armolt displayed a firearm towards the employees, demanding prescriptions. Police say he then fled the scene in a black Pontiac Sunfire with a black convertible top.
Officials searched his apartment and found the gun used to rob the store, along with the stolen prescription drugs.
Armolt is charged with armed robbery and grand larceny.