Gastro-floating tablets of cephalexin were developed to prolong the residence time in major absorption sites. Gastro-floating tablets were prepared and optimized using hydroxypropyl methylcellulose (HPMC K100M) as matrix and sodium bicarbonate as a gas-forming agent. The properties of the tablets in terms of floating lag time, floating time and in vitro release were evaluated. Furthermore, in vivo pharmacokinetic study in fed and fasted beagle dogs was performed. The gastro-floating tablets had short floating lag time and exhibited a satisfactory sustained-release profile in vitro. Compared with conventional capsules, the gastro-floating tablets presented a sustained-release behavior with a relative bioavailability of 99.4%, while the reference sustained-release tablets gave a relative bioavailability of only 39.3%. Meanwhile, the food had significant effect on the pharmacokinetics of sustained-release tablets. It was concluded that the gastro-floating tablets had a sustained-release effect in vitro and in vivo, as well as desired pharmacokinetic properties in both fed and fasted conditions.