Objective To analyze the effect of psychological nursing on anxiety and depression in elderly patients with diabetes.Methods: 60 elderly patients with type 2 diabetes admitted to our hospital from December 2020 to December 2021 were randomly divided into two groups: the reference group (n=30, receiving routine care) and the observation group (n=30, receiving routine care+psychological care) Compare the scores of the Hamilton Anxiety and Depression Scale (HAMA) and Hamilton Depression Scale (HAMD), as well as the treatment compliance score.Result: (1) Before intervention, there was no significant difference in the blood glucose test results between the two groups of patients (P>0.05); The detection results of various indicators in the observation group after intervention were lower than those in the reference group (P<0.05); (2) Before intervention, there was no significant difference in the scores of anxiety and depression between the two groups of patients (P>0.05); After intervention, the scores of both scales in the observation group were lower than those in the reference group (P<0.05); (3) Before intervention, there was no significant difference in treatment compliance scores between the two groups of patients (P>0.05); After intervention, the score of this scale in the observation group was lower than that in the reference group (P<0.05).Conclusion: Psychological nursing for elderly patients with diabetes on the basis of routine nursing can improve their anxiety and depression, improve treatment compliance, and then help to reduce blood sugar.