Infection with SARS-CoV-2 is associated with fatigue and sleep problems long after the acute phase of COVID-19. In addition, there are concerns of SARS-CoV-2 infection causing psychiatric illness; however, evidence of a direct effect is inconclusive. To assess risk of risk of incident or repeat psychiatric illness, fatigue, or sleep problems following SARS-CoV-2 infection and to analyze changes according to demographic subgroups. This cohort study assembled matched cohorts using the Clinical Practice Research Datalink Aurum, a UK primary care registry of 11 923 499 individuals aged 16 years or older. Patients were followed-up for up to 10 months, from February 1 to December 9, 2020. Individuals with less than 2 years of historical data or less than 1 week follow-up were excluded. Individuals with positive results on a SARS-CoV-2 test without prior mental illness or with anxiety or depression, psychosis, fatigue, or sleep problems were matched with up to 4 controls based on sex, general practice, and year of birth. Controls were individuals who had negative SARS-CoV-2 test results. Data were analyzed from January to July 2021. SARS-CoV-2 infection, determined via polymerase chain reaction testing. Cox proportional hazard models estimated the association between a positive SARS-CoV-2 test result and subsequent psychiatric morbidity (depression, anxiety, psychosis, or self-harm), sleep problems, fatigue, or psychotropic prescribing. Models adjusted for comorbidities, ethnicity, smoking, and body mass index. Of 11 923 105 eligible individuals (6 011 020 [50.4%] women and 5 912 085 [49.6%] men; median [IQR] age, 44 [30-61] years), 232 780 individuals (2.0%) had positive result on a SARS-CoV-2 test. After applying selection criteria, 86 922 individuals were in the matched cohort without prior mental illness, 19 020 individuals had prior anxiety or depression, 1036 individuals had psychosis, 4152 individuals had fatigue, and 4539 individuals had sleep problems. After adjusting for observed confounders, there was an association between positive SARS-CoV-2 test results and psychiatric morbidity (adjusted hazard ratio [aHR], 1.83; 95% CI, 1.66-2.02), fatigue (aHR, 5.98; 95% CI, 5.33-6.71), and sleep problems (aHR, 3.16; 95% CI, 2.64-3.78). However, there was a similar risk of incident psychiatric morbidity for those with a negative SARS-CoV-2 test results (aHR, 1.71; 95% CI, 1.65-1.77) and a larger increase associated with influenza (aHR, 2.98; 95% CI, 1.55-5.75). In this cohort study of individuals registered at an English primary care practice during the pandemic, there was consistent evidence that SARS-CoV-2 infection was associated with increased risk of fatigue and sleep problems. However, the results from the negative control analysis suggest that unobserved confounding may be responsible for at least some of the positive association between COVID-19 and psychiatric morbidity.