Introduction: Nepal has one of the highest prevalences of hypertension in South Asia, which also causes other cardiovascular diseases. However, no studies investigated the prevalence and risk factors of hypertension by urban-rural stratification. Methods: We used a machine learning, Boruta algorithm to select risk factors and a tenfold random forest classifier to evaluate their performance. Finally, multivariate logistic regression estimated crude and adjusted odds ratios with 95% confidence intervals for knowledge generation. Results: The study included 7825 participants (urban: 4939; rural: 2886), where rural participants were slightly older (median: 37 years; interquartile range: 26–53) and females were more hypertensive (urban: n = 606, 34.5%; rural: n = 308, 31.2%). The prevalence of hypertension was 35.6% in urban and 34.1% in rural regions. The odds of hypertension increased in rural regions for advancing age, provinces (province 4 and 5), and ecological zones (hill and terai). Overweight and obese participants were more likely to have hypertension in both regions. Conclusion: The study recommends the rigorous improvement of public health programs in rural regions of province 4 and 5, concentrating on Dalit and Janajati older males from hill and terai ecological zones. Overweight and obese people from both regions also need special focus. Finally, policymakers and government officials have to tailor campaigns differently for robust implementation of the essential health-care package and multisectoral action plans to prevent and control hypertension.