Abstract Background Osteoporosis is a metabolic bone disorder characterised by decreased bone mineral density and mass. Due to its asymptomatic nature, it often remains undiagnosed and untreated until a fracture occurs. Traditionally, treatment decisions for osteoporosis are based on clinical appropriateness while balancing the treatment's risks and benefits. Machine learning (ML) is revolutionising healthcare domains through pattern recognition of previously “unseen” observations. Presently, its application in osteoporosis is limited to early diagnosis. More research is needed to examine its role in guiding osteoporosis treatment. This study aims to identify new predictive attributes for osteoporosis treatment using ML techniques on data from the Irish Hip Fracture Database (IHFD). Methods Datasets from January to March 2023 in University Hospital Waterford were sourced from the IHFD. Osteoporosis treatment decisions were obtained from discharge letters. Preliminary data cleaning was performed in Excel with zero-variance and near-zero predictor. Attributes excluded. The dataset was entered into the WEKA 3.8.6 environment for ML processing. Results The initial dataset containing 141 instances and 32 attributes was refined using the Correlation Feature Selection and Ranker Search Method, identifying key osteoporosis treatment predictors. The highest correlation attributes are pre-fracture total score, pre-fracture indoor score, and age. Moderately positive correlations are discharge destination, pre-fracture outdoor and shopping score, ASA grade, Length-of-stay, admission code, Admission 4AT score, Frailty scale, and fracture type. The implemented J48 Tree ML-trained model revealed Correctly Classified Instances and Incorrectly Classified Instances of 98.24% and 1.7%, respectively, indicating a high prediction accuracy rate. Conclusion This study demonstrates the potential of ML in enhancing osteoporosis treatment decision-making by leveraging datasets from the IHFD. Integrating ML algorithms with traditional approaches can provide a comprehensive, nuanced and personal approach to osteoporosis treatment and patient care. The study opens avenues for future research in applying big data and advanced analytics in healthcare, underscoring the evolving landscape of medical decision-making.