Accurate prediction of physicochemical properties such as the octanol-water partition coefficient’s logarithm (LogP) is critical in early-stage drug development. This study presents a novel and interpretable computational framework that integrates symbolic graph-theoretical descriptors, specifically topological indices derived from M-polynomials, with machine learning (ML) techniques for LogP prediction in oncology drug molecules. Molecular graphs were constructed from SMILES strings, and eight M-polynomial-based topological indices were computed as predictive features. A comprehensive suite of regression models was applied, ranging from univariate and multivariate linear regressions to regularized methods (least absolute shrinkage and selection operator (LASSO), ridge, ElasticNet) and nonlinear ensemble learners (random forest, XGBoost). Dimensionality reduction using principal component analysis (PCA) and rigorous validation via cross-validation and bootstrapping were conducted. Among all approaches, ensemble models combining XGBoost and random forest with bootstrapping yielded the most robust performance, achieving an R2 score greater than 0.6 and a low prediction error. These results demonstrate the effectiveness of M-polynomial-derived indices as interpretable molecular descriptors and affirm the predictive utility of advanced ML models in quantitative structure-property relationship (QSPR) modeling. To our knowledge, this is among the first comprehensive studies integrating ensemble-based ML methods and M-polynomial-derived topological indices for LogP prediction in oncology drugs.