Global attention is now being paid to maternal and child mortality. The incidence of maternal mortality is high in low and middle-income countries, particularly among adolescents and young adults. Healthcare professionals can monitor the mother's heartbeat during pregnancy to determine fetal viability using CTGs to prevent these deaths. To reduce child and maternal mortality, this work presented a risk factor analysis using machine learning approaches. As part of this study, this work evaluated seven machine learning algorithms. To assess the performance of different categorization algorithms, accuracy, precision, and recall were used. The random forest has achieved the highest 99.98% accuracy among the other algorithms. Initially, the dataset was imbalanced, after applying undersampling and oversampling methods, all algorithms performed excellently. A major focus of the present study was to predict the risk factor of child and maternal mortality using clinical data. Sending an ultrasound pulse and reading the response is how ultrasound devices work. To prevent child and maternal mortality, this analysis is an effective and cost-effective option for healthcare professionals.