The basics
Carry only a reasonable personal supply, keep medicines in their original packaging with instructions, and bring the prescription for any prescription drug, ideally in English, in case customs or doctors ask to see it.
Controlled medicines (narcotic and psychotropic)
Narcotic and psychotropic medicines are specially controlled. For a small personal supply needed for treatment, you must have a medical prescription and supporting documents and declare it to customs. Quantities must stay within reasonable personal use.
Declaring at customs
Declare your medication honestly on arrival and prepare an English list with names, dosages and purposes. If inspected, present the prescription and diagnosis notes and cooperate with the check.
Alternatives for long-term medication
For long-term medication, ask in advance whether the same active ingredient is available in China and have a local doctor assess and prescribe it. Never rely on informal channels to mail medicines.