Madushanka, 25, who took a hat-trick of wickets on his international debut in 2018, was remanded in custody for two weeks by a magistrate.
He was carrying just over two grams of heroin when detained in the town of Pannala on Sunday, a police official said.
Madushanka was stopped while driving with another person in a car during a nationwide coronavirus curfew, police said.
The right-arm pace bowler took a hat-trick against Bangladesh on his one-day international debut in January 2018. He also played two T20 matches against Bangladesh in 2018, but has not played an international since due to injuries.
Sri Lanka is due to relax its curfew from Tuesday, but police have arrested nearly 65,000 people for breaking the restrictions imposed on March 20.