The present invention describes a controlled porosity osmotic pellet formulation for controlled drug delivery. The pharmaceutical composition contains a carrier medium which does not maintain its integrity in the environment of its use and a core containing one or more osmotic agents which is surrounded by a amorphous solid dispersion layer comprising of active pharmacological ingredient with one or more polymer and/or one or more surfactant and outer layer is covered by rate controlling membrane which is permeable to water and impermeable to solute.