Carlisle tax collector George Hicks disputes the allegations, saying he uses marijuana for medical reasons.
Hicks was arrested Tuesday on two felony charges of possession with intent to deliver and released on bail.
Cumberland County prosecutors say Hicks twice sold drugs to an undercover officer. Police say they have video and audio evidence to support the charges.
District Attorney David Freed says the sales took place in an office a few doors from where Hicks worked as tax collector.
A judge granted an injunction temporarily relieving Hicks of his duties. The borough is taking over his duties.