Unintended pregnancy is defined as a pregnancy that is either mistimed (wanted at a later time) or unwanted (not wanted at all). It has been a concerning issue for reproductive health and public health, with significant negative effects on the mother, child, and the public at large. It is a worldwide public health issue that can have a major impact on the health of pregnant women and newborns. The study was conducted using secondary data from IPUMS Multiple Indicator Cluster Surveys round 6. The analysis was based on a data merged from six sub-Saharan Africa countries such as Gambia, Ghana, Lesotho, Malawi, Nigeria, and Sierra Leone. A total weighted sample of 28,027married/in-union reproductive-age women was included in the study. Seven machine learning algorithms were trained and their performance compared in predicting unintended pregnancy. Finally, Shapley Additive exPlanations model explanation technique was used to identify the predictors of unintended pregnancy. XGBoost was the top-performing model, achieved the highest area under receiver operating characteristic curve (0.62) and accuracy (65.92%), surpassing all other models. SHAP global feature importance identified top predictors of unintended pregnancy, with women from Malawi, Ghana, and Lesotho, women having primary education and secondary education, with parity of more than three, have higher likelihood of unintended pregnancy. In the other hand, women from Nigeria and Sierra Leone, whose husband/partner has more wives or partners (polygamy relation), and women who owns mobile phone had lower risk of unintended pregnancy. These findings highlight the importance of considering contextual factors, such as country-specific sociocultural norms and individual characteristics, in understanding and addressing unintended pregnancies. By strategically addressing the identified predictors, policymakers, and healthcare providers can develop impactful programs that address the root causes of unintended pregnancies, ultimately contributing to improved reproductive health outcomes worldwide.