It provides comprising the unstable drug of an alkalinity and an a kind of stable bioadhesive composition of the method for its preparation. In one aspect, it includes the matrix-forming material that a preforming excipient mixture includes the thermoplastic of an acidic component and an alkali, such as polymer that composition, which is hot-melt extruded (HME) composition,. Before the drug unstable with an alkalinity mixes, excipient mixture is formed. Then mixing is the hot-melt extruded to form HME compositions. By so doing, in acidic component energy and/or quite acid excipient mixture is provided. This particular process is shown as that the degradation of the unstable drug of an alkalinity is greatly lowered during hot-melt extrusion. Excipient mixture softens or melts during hot-melt extrusion. It, which can dissolve or not dissolve during extruding, contains medicine particle. Various functional excipients may be embodied in carrier system with improve process performance and/or improve HME compositions chemistry or physical property.