Although dietary patterns are crucial to cognitive function, associations of dietary patterns with cognitive function have not yet been fully understood. This cross-sectional study explored dietary patterns associated with cognitive function among the older adults in underdeveloped regions, using 1504 community-dwelling older adults aged 60 and over. Diet was assessed using a food frequency questionnaire and 24-h dietary recall. Factor analysis was used to extract dietary patterns. Global cognitive function was assessed using the Mini-Mental State Examination (MMSE). Two dietary patterns, a "mushroom, vegetable, and fruits" (MVF) pattern and a "meat and soybean products" (MS) pattern, were identified. The MVF pattern, characterized by high consumption of mushrooms, vegetables, and fruits was significantly positively associated with cognitive function (p < 0.05), with an odds ratio of (95% CIs) 0.60 (0.38, 0.94) for cognitive impairment and β (95% CIs) 0.15 (0.02, 0.29) for -log (31-MMSE score). The MS pattern, characterized by high consumption of soybean products and meat, was also associated with better cognitive function, with an odds ratio of 0.47 (95% CIs 0.30, 0.74) for cognitive impairment and β (95% CIs) 0.34 (0.21, 0.47) for -log (31-MMSE score). Our results suggested that both the MVF and MS patterns were positively associated with better cognitive function among older adults in underdeveloped regions.