Meloxicam (MLX) is one of the most effective NSAIDs, but its poor water solubility and low bioavailability limit its clinical application. In this study, we designed a thermosensitive in situ gel of the hydroxypropyl-β-cyclodextrin inclusion complex (MLX/HP-β-CD-ISG) for rectal delivery to improve bioavailability. The best method for preparing MLX/HP-β-CD was the saturated aqueous solution method. The optimal inclusion prescription was optimized using an orthogonal test, and the inclusion complex was evaluated via PXRD, SEM, FTIR and DSC. Then, MLX/HP-β-CD-ISG was characterized regarding the gel properties, release in vitro, and pharmacokinetics in vivo. The inclusion rate of the inclusion complex obtained via the optimal preparation process was 90.32 ± 3.81%. The above four detection methods show that MLX is completely embedded in the HP-β-CD cavity. The developed MLX/HP-β-CD-ISG formulation has a suitable gelation temperature of 33.40 ± 0.17 °C, a gelation time of 57.33 ± 5.13 s, pH of 7.12 ± 0.05, good gelling ability and meets the requirements of rectal preparations. More importantly, MLX/HP-β-CD-ISG significantly improved the absorption and bioavailability of MLX in rats, prolonging the rectal residence time without causing rectal irritation. This study suggests that the MLX/HP-β-CD-ISG can have a wide application prospect with superior therapeutic benefits.