Social and environmental risk factors in informal settlements and slums may contribute to increased risk of cardiovascular disease (CVD). This study assesses the socioeconomic inequalities in CVD risk factors in Brazil comparing slum and non-slum populations. Responses from 94,114 individuals from the 2019 Brazilian National Health Survey were analysed. The United Nations Human Settlements Programme definition of a slum was used to identify slum inhabitants. Six behavioural risk factors, four metabolic risk factors and doctor-diagnosed CVD were analysed using Poisson regression models adjusting for socioeconomic characteristics. Compared to urban non-slum inhabitants, slum inhabitants were more likely to: have low (less than five days per week) consumption of fruits (APR: 1.04, 95%CI 1.01-1.07) or vegetables (APR: 1.08, 95%CI 1.05-1.12); drink four or more alcoholic drinks per day (APR: 1.05, 95%CI 1.03-1.06); and be physically active less than 150 minutes per week (APR: 1.03, 95%CI 1.01-1.04). There were no differences in the likelihoods of doctor-diagnosed metabolic risk factors or CVD between the two groups in adjusted models. There was a higher likelihood of behavioural and metabolic risk factors among those with lower education, with lower incomes, and the non-White population. Brazilians living in slums are at higher risk of behavioural risk factors for CVD, suggesting local environments might impact access to and uptake of healthy behaviours.