Jackie Chan has said he is ashamed and saddened over his son's detention on drug charges in Beijing, and he apologised to the public.

The Hong Kong film star wrote on his microblog that Jaycee Chan would have to face the consequences of his actions, but they would do so together.

"Regarding this issue with my son Jaycee, I feel very angry and very shocked. As a public figure, I'm very ashamed. As a father, I'm heartbroken," Jackie wrote.

Jaycee Chan, 31, was detained with Taiwanese movie star Kai Ko, becoming the latest high-profile celebrities to be ensnared in one of China's biggest anti-drug crackdowns in two decades.

Police said both actors tested positive for marijuana and admitted using the drug, and that 100 grams (3.53 ounces) of it were taken from Jaycee's home.

"Jaycee and I together express our deep apology to society and the public," Jackie wrote.

Extending from his fame as an actor and singer, the elder Chan is a high-profile public figure in mainland China and was named by Beijing as an anti-drug ambassador in 2009.

"I hope all young people will learn a lesson from Jaycee and stay far from the harm of drugs," he wrote. "I say to Jaycee that you have to accept the consequences when you do something wrong. As your father, I'm going to face the road together with you."

Ko, 23, was part of an anti-drug campaign two years ago, in which he joined other celebrities in a public service announcement declaring: "I don't use drugs."

Chinese President Xi Jinping declared in June that illegal drugs should be wiped out and that offenders should be severely punished. The crackdown has snared more than 7,800 people in Beijing alone, according to police.

Detained previously was Gao Hu, who acted in the 2011 movie "The Flowers of War." And Beijing performing arts associations and theater companies have pledged to not hire any actors connected with drugs.

Chinese state broadcaster CCTV aired footage of a police search of the younger Chan's home in Beijing in which he is shown, his face pixelated, pointing out to officers where he stashed bags of marijuana. Police said they acted on a tipoff from the public.

Chan is accused of aiding and abetting other drug users, an offense that carries a maximum sentence of three years' imprisonment. Two other people detained in the same case were accused of selling drugs while Ko is accused of using drugs