This invention provides a method and compositions for the controlled release of drugs that have been attached by means of a covalent bond to a polymer or other moiety that blocks activity of the drug until it has been released. A two-stage process is provided in which an unmasking reaction results in the formation of a chemical group that can then undergo a second reaction to release the drug. In a preferred embodiment, the narcotic analgesic fentanyl covalently attached to an inert polymer by way of its nitrogen through the formation of a quaternary vinylammonium salt, and then released by a sequence involving hydrolysis of an acetal that exposes an alcohol that may then undergo an intramolecular nucleophilic substitution reaction involving displacement of the nitrogen of oxycodone. The rate of this process may be controlled by controlling either or both of the rates of the acetal hydrolysis or the intramolecular substitution reaction, but is preferably controlled by the latter through varying the number of atoms in the chain connecting the alcohol group and the vinylic carbon, as well as by the addition of substituents on that chain. The drug-delivery molecules of this invention are useful for release of amine, alcohol and thiol drugs, including a number of narcotic analgesics, tricyclic amine antidepressants, and many others.