β-blockers are widely used for treating cardiac conditions and are suggested for the treatment of anxiety and aggression, although research is conflicting and limited by methodological problems. In addition, β-blockers have been associated with precipitating other psychiatric disorders and suicidal behaviour, but findings are mixed. We aimed to examine associations between β-blockers and psychiatric and behavioural outcomes in a large population-based cohort in Sweden. We conducted a population-based longitudinal cohort study using Swedish nationwide high-quality healthcare, mortality, and crime registers. We included 1,400,766 individuals aged 15 years or older who had collected β-blocker prescriptions and followed them for 8 years between 2006 and 2013. We linked register data on dispensed β-blocker prescriptions with main outcomes, hospitalisations for psychiatric disorders (not including self-injurious behaviour or suicide attempts), suicidal behaviour (including deaths from suicide), and charges of violent crime. We applied within-individual Cox proportional hazards regression to compare periods on treatment with periods off treatment within each individual in order to reduce possible confounding by indication, as this model inherently adjusts for all stable confounders (e.g., genetics and health history). We also adjusted for age as a time-varying covariate. In further analyses, we adjusted by stated indications, prevalent users, cardiac severity, psychiatric and crime history, individual β-blockers, β-blocker selectivity and solubility, and use of other medications. In the cohort, 86.8% (n = 1,215,247) were 50 years and over, and 52.2% (n = 731,322) were women. During the study period, 6.9% (n = 96,801) of the β-blocker users were hospitalised for a psychiatric disorder, 0.7% (n = 9,960) presented with suicidal behaviour, and 0.7% (n = 9,405) were charged with a violent crime. There was heterogeneity in the direction of results; within-individual analyses showed that periods of β-blocker treatment were associated with reduced hazards of psychiatric hospitalisations (hazard ratio [HR]: 0.92, 95% confidence interval [CI]: 0.91 to 0.93, p < 0.001), charges of violent crime (HR: 0.87, 95% CI: 0.81 to 0.93, p < 0.001), and increased hazards of suicidal behaviour (HR: 1.08, 95% CI: 1.02 to 1.15, p = 0.012). After stratifying by diagnosis, reduced associations with psychiatric hospitalisations during β-blocker treatment were mainly driven by lower hospitalisation rates due to depressive (HR: 0.92, 95% CI: 0.89 to 0.96, p < 0.001) and psychotic disorders (HR: 0.89, 95% CI: 0.85 to 0.93, p < 0.001). Reduced associations with violent charges remained in most sensitivity analyses, while associations with psychiatric hospitalisations and suicidal behaviour were inconsistent. Limitations include that the within-individual model does not account for confounders that could change during treatment, unless measured and adjusted for in the model. In this population-wide study, we found no consistent links between β-blockers and psychiatric outcomes. However, β-blockers were associated with reductions in violence, which remained in sensitivity analyses. The use of β-blockers to manage aggression and violence could be investigated further.