Drug delivery to the pulmonary system has been achieved by encapsulation of the drug to be delivered in microparticles having a size range between 0.5 and ten microns, preferably in the range of two to five microns, formed of a material releasing drug at a pH of greater than 6.4. In a preferred embodiment, the drug delivery system is based on the formation of diketopiperazine microparticles which are stable at a pH of 6.4 or less and unstable at pH of greater than 6.4, or which are stable at both acidic and basic pH, but which are unstable at pH between about 6.4 and 8. Other types of materials can also be used, including biodegradable natural and synthetic polymers, such as proteins, polymers of mixed amino acids (proteinoids), alginate, and poly(hydroxy acids). In another embodiment, the microparticles have been modified to effect targeting to specific cell types and to effect release only after reaching the targeted cells.