The COVID-19 pandemic and its preventive measures had adverse consequences for mental health. However, knowledge of mental health trajectories across the pandemic is limited. This study investigated the mental health levels and changes among university students during the pandemic and lockdown in Germany, as well as their associated factors. We surveyed students' mental health (N = 363, 68% female) with the patient health questionnaire (PHQ-8) and the generalized anxiety disorder scale (GAD-7) during the first easing phase (July 2020; time 1) and the second lockdown (November 2020; time 2). Cut-off scores from the GAD-7 and PHQ-8 were used to determine clinically relevant symptoms and to define trajectory groups. Sociodemographic and pandemic-related data were assessed (e.g., coping with academic life, social contacts) as well as loneliness, stress, repetitive negative thinking, quality of life, and perceived social support. Paired t-test, multiple regression, and repeated-measures ANOVA were applied. Means and prevalence rates for symptoms of depression (38.8%) and anxiety (25.6%) did not differ between time 1 and time 2, and most students were asymptomatic on the PHQ-8 (44.4%) and the GAD-7 (56.3%) across the pandemic. Feelings of loneliness significantly increased from time 1 to time 2, d = −0.30, [−0.47, −0.13], with higher symptom levels in symptomatic groups at time 2 and greater increases in the asymptomatic groups. Levels of stress, repetitive negative thinking, quality of life, and social support did not differ during the pandemic. At time 1, loneliness and repetitive negative thinking were associated with anxiety and depressive symptoms. Anxiety and depressive symptoms were prevalent among students, and increased levels of loneliness during the pandemic were associated with elevated symptoms and differing trajectories. Further research using representative and larger samples should determine the long-term impact of the pandemic on mental health and loneliness to identify vulnerable students and offer adequate support.