Background Current malaria diagnosis methods that rely on microscopy and Histidine Rich Protein2 (HRP2)-based rapid diagnostic tests (RDT) have drawbacks that necessitate the development of improved and complementary malaria diagnostic methods to overcome some or all of these limitations. Consequently, the automated detection and classification of malaria can provide patients with a faster and more accurate diagnosis. Therefore, this study used a machine-learning model to predict the occurrence of malaria based on sociodemographic behaviour, environment, and clinical features.Method Data from 200 Nigerian patients were used to develop predictive models using nested cross-validation and sequential backward feature selection (SBFS), with 80% of the dataset randomly selected for training and optimisation and the remaining 20% for testing the models.Results Among the three machine learning models examined, the penalised logistic regression model had the best area under the receiver operating characteristic (ROC) curve for the training set (84%; 95% confidence interval (CI) = 75–93%) and test set (83%; 95% CI = 63–100%). Increased odds of malaria was associated with high body weight (adjusted odds ratio (AOR) = 4.50, 95% CI = 2.27–8.01, p < 0.0001). Even though the association between the odds of having malaria and body temperature was insignificant, patients with body temperature had higher odds of having malaria than those who did not have body temperature (AOR = 1.40, CI = 0.99–1.91, p-value = 0.068). In addition, patients who had bushes in their surroundings (AOR = 2.60, 95% CI = 1.30–4.66, p-value = 0.006) or experienced fever (AOR = 2.10, CI = 0.88–4.24, p-value = 0.099), headache (AOR = 2.07; CI = 0.95–3.95, p-value = 0.068), muscle pain (AOR = 1.49; CI = 0.66–3.39, p-value = 0.333), and vomiting (AOR = 2.32; CI = 0.85–6.82, p-value = 0.097) were more likely to experience malaria. In contrast, decreased odds of malaria were associated with age (AOR = 0.62, 95% CI = 0.41–0.90, p-value = 0.012) and BMI (AOR = 0.47, 95% CI = 0.26–0.80, p = 0.006).Conclusion Newly developed routinely collected baseline sociodemographic, environmental, and clinical features to predict malaria types may serve as a valuable tool for clinical decision-making.