The issue of drug abuse among miners was highlighted after an accident three years ago in which one miner was killed and another seriously injured in a Floyd County underground mine, the Associated Press reported.
Drugs were found near the scene of the accident and an autopsy revealed the dead miner had taken illegal drugs.
Over the past year coal mine operators have testified at hearings that drug abuse among miners had become widespread.
A taskforce recommended mandatory drug testing that would involve pre-screenings before miners are hired and random tests during work.
The legislation was unanimously passed by the House and now moves to the state Senate for consideration.