This paper presents an innovative mathematical framework for modeling drug pharmacokinetics through a multi-compartmental stochas- tic approach integrated with machine learning. We extend traditional compartmental models by incorporating non-linear diffusion processes, stochastic differential equations, and patient-specific parameters. The model demonstrates improved prediction accuracy (91.8% vs. 85.6% in traditional models) and provides robust frameworks for personal- ized medicine applications. Results show significant improvements in drug concentration predictions and clinical outcomes, with a 28% re-duction in adverse events.