Undernutrition in hospitalized patients is a significant healthcare burden worldwide. Depression is a major global health problem characterized by symptoms such as altered mood, loss of interest and pleasure, and impairment in cognitive and physical functions. Patients hospitalized for medical conditions have a higher risk of depression than the general population. The purpose of this study was to explore the relationship between undernutrition risk and depression risk in hospitalized patients. The design of this study was an observational cross-sectional analytic. A questionnaire form created by the investigator including sociodemographic data, dietary patterns, presence of chronic diseases and anthropometric measurements, Nutritional Risk Screening and Patient Health Questionnaire-2 were applied to the patients. All quantitative data were expressed as the median and interquartile range and qualitative data were expressed as numbers and percentage. Mann–Whitney U test and Kruskal–Wallis test were used to analyze nonparametric data; Chi-square and Fisher Exact test were used to analyze qualitative data. P < .05 was considered statistically significant. A total of 308 patients who met the criteria were reached. Undernutrition was detected in 28.6% of the participants, and depression was present in 37.3%. A statistically significant relationship was found between the risk of undernutrition and the risk of depression, with individuals without a risk of depression being found to have a lower risk of undernutrition. (P < .001). The risk of undernutrition was found to increase with advancing age. Moreover, individuals with higher values for arm muscle area, arm muscle circumference, mid-upper arm circumference, triceps skinfold thickness, calf circumference, and body mass index had a lower risk of undernutrition. No relationship was found between gender and the risk of depression. However, a statistically significant relationship was observed between age and the risk of depression, indicating that older patients had a higher risk of depression. In this study, a statistically significant relationship was found between the risk of undernutrition and the risk of depression in hospitalized patients. It was observed that the risk of undernutrition was lower in individuals without risk of depression.