The objective of the present study was to develop pH-independent/dependent sustained release (SR) tablets of ondansetron HCl dihydrate (OND), a selective 5-HT3 receptor antagonist that is used for prevention of nausea and vomiting caused by chemotherapy, radiotherapy and postoperative treatment. The challenge with the OND API is its pH-dependent solubility and relatively short elimination half-life. Therefore, investigations were made to solve these problems in the current study. Formulations were prepared using stearic acid as a binding agent via a melt granulation process in a twin-screw extruder. The micro-environmental pH of the tablet was manipulated by the addition of fumaric acid to enhance the solubility and release of OND from the tablet. The in vitro release study demonstrated sustained release for 24 h with 90% of drug release in formulations using stearic acid in combination with ethyl cellulose, whereas 100% drug release in 8 h for stearic acid-hydroxypropylcellulose matrices. The formulation release kinetics was correlated to the Higuchi diffusion model and a non-Fickian drug release mechanism. The results of the present study demonstrated for the first time the pH dependent release from hydrophilic-lipid matrices as well as pH independent release from hydrophobic-lipid matrices for OND SR tablets manufactured by means of a continuous melt granulation technique utilizing a twin-screw extruder.