QUJING, China—In China, marijuana is seen as a dangerous narcotic, and possession is strictly punished. That hasn’t stopped the country from trying to become a powerhouse in the fast-growing industry for cannabis products.

China has grown hemp, a strain of cannabis, for thousands of years to use in clothing and traditional medicine and is one of the world’s largest hemp producers. The country is using that foothold to churn out cannabidiol, or CBD, a loosely regulated chemical related to marijuana that is finding its way into...