BACKGROUND: The majority (∼65%) of food products purchased by US households are considered ultra-processed foods (UPF). Consumption of UPF is associated with a variety of adverse health outcomes including dementia. Most research on UPF consumption and cognition measure UPF as a single entity despite extensive variability in the types of foods that are considered UPF. OBJECTIVE: The objective of this study is to investigate the extent to which consumption of individual categories of UPF are related to the risk of developing cognitive impairment over seven years. METHODS: Data from the Health and Retirement Study (HRS), a panel study, were used to examine UPF consumption and risk of developing cognitive impairment in 4,750 middle-aged and older U.S. adults. Diet was assessed using the Harvard food frequency questionnaire at baseline and cognitive status was assessed bienially from 2014 to 2020 using measures of recall and executive function. Foods were categorized using the NOVA system. The UPF foods were divided into categories based on previously reported criteria. The relationship between total UPF consumption and nine UPF categories and cognitive status were assessed using adjusted Cox proportional hazard analyses. RESULTS: 1,363 participants developed cognitive impairment. Consumption of an additional average daily serving of ultra-processed animal products and beverages were associated with 17% (95% CI: 1.032, 1.326) and 6.3% (95% CI: 1.010, 1.118) heightened risk of developing cognitive impairment throughout the study period. Total UPF consumption and consumption of other UPF categories (other, sweets, spreads, savory snacks, ready-to-eat meals, grains, dairy-based) were not associated with risk of developing cognitive impairment. CONCLUSIONS: These results reinforce the value of separating UPF into categories. The link between UPF animal products and beverages with cognitive functions may be, in part, explained by their ingredients, such as additives, or by the poor nutritional composition of prducts rich in simple sugars and low in dietary fibers.