The present invention provides a composition comprising nalbuphine prodrug- Sebacoyl dinalbuphine ester and pharmaceutical biodegradable polymer PLGA. The composition is prepared as a controlled release formulation, which can be implanted in a human body, and the formulation is lozenge, capsule, soft capsule, pill, suspension, microsphere, oral implant, emulsified injection, implant or others. The controlled release formulation significantly improves the dosage of common nalbuphine injection, the composition for four times to six times daily administration is improved to once half a month or several months administration, and that is one of the characteristic and effect of the invention. By in vivo tests, the present invention confirmed the pharmacokinetic properties of controlled release formulation, and evaluated effective duration time, the controlled release formulation is used to improve the dosage of common nalbuphine injection.