In Western populations, obesity has been shown to have deleterious effects on many functions of the human body, including cognitive functions. To investigate the relationship between obesity and cognitive function impairment in the Saudi adult population. This cross-sectional study was conducted at King Saud University Hospital, Riyadh. All adult visitors to clinics and wards from February 2014 to March 2016 who met the selection criteria were included in the sample. The participants were divided into three comparable groups according to BMI: normal weight (BMI <25; Group I), overweight (BMI 25–29.9; Group II), and obese (BMI ≥30; Group III). The Cambridge Neurophysiological Test Automated Battery (CANTAB) was used to record the following cognitive function parameters: stop signal tasks (SST) and intra-extra dimensional shift (IED). A total of 138 participants were included in the study. The mean age of participants was 22.2 ± 2.7 years. SST mean correct reaction time on GO trials for Group I was 601.6 ± 290.2; for Group II it was 797.8 ± 303.2 (p = 0.011 compared to Group I), and for Group III it was 893.5 ± 378.7 (p < 0.001 compared to Group I). SST median correct reaction time on GO trials for Group I was 551.57 ± 234.49; for Group 2 it was 693.2 ± 275.7 (p = 0.025), and for Group III it was 742.7 ± 287.1 (p = 0.002). The stop signal task stop signal delay (SST SSD) 50% last half was 327.51 ± 178.63 for Group I; for Group II it was 449.5 ± 207.7 (p = 0.020), and for Group III it was 447.4 ± 263.7 (p = 0.028). Group I completed an average of 8.3 ± 1.3 IED stages; Group II completed 7.5 ± 2.6 (p = 0.090), and Group III completed 8.5 ± 0.8 (p = 1.000). PRM values did not differ significantly across groups. However, cognitive function was significantly delayed for the higher BMI groups when a post-hoc Bonferroni correction was applied. Age and gender correlated significantly, as did gender and BMI. Our findings suggest that Saudi subjects with higher BMI values exhibit poorer performance in many domains of cognitive function than Saudi individuals with a BMI in the normal range. • Obesity significantly affects brain structure and cognitive function. • The relationship between obesity and cognitive function impairment. • An increase in BMI is related to a decrease in cognitive performance.