Finding effective treatment regimens for bipolar disorder is challenging, as many patients suffer from significant symptoms despite treatment. This study investigated the risk of relapse (psychiatric hospitalization) and treatment safety (non-psychiatric hospitalization) associated with different doses of antipsychotics and mood stabilizers in persons with bipolar disorder. Individuals aged 15-65 with bipolar disorder were identified from Finnish national health registers in 1996-2018. Studied antipsychotics included olanzapine, risperidone, quetiapine, aripiprazole; mood stabilizers lithium, valproic acid, lamotrigine, and carbamazepine. Medication use was divided into three time-varying dose categories: low, standard, and high. The studied outcomes were risk of psychiatric hospitalization (relapse) and the risk of non-psychiatric hospitalization (treatment safety). Stratified Cox regression in within-individual design was used. The cohort included 60,045 individuals (mean age 41.7 years, SD 15.8; 56.4% female). Mean follow-up was 8.3 years (SD 5.8). Of antipsychotics, olanzapine and aripiprazole were associated with a decreased risk of relapse in low and standard doses, and risperidone in low dose. The lowest adjusted hazard ratio (aHR) was observed for standard dose aripiprazole (aHR 0.68, 95% CI 0.57-0.82). Quetiapine was not associated with a decreased risk of relapse at any dose. Mood stabilizers were associated with a decreased risk of relapse in low and standard doses; lowest aHR was observed for standard dose lithium (aHR 0.61, 95% CI 0.56-0.65). Apart from lithium, high doses of antipsychotics and mood stabilizers were associated with an increased risk of non-psychiatric hospitalization. Lithium was associated with a decreased risk of non-psychiatric hospitalization in low (aHR 0.88, 95% CI 0.84-0.93) and standard doses (aHR 0.81, 95% CI 0.74-0.88). Standard doses of lithium and aripiprazole were associated with the lowest risk of relapse, and standard dose of lithium with the lowest risk of non-psychiatric hospitalization. Quetiapine was not associated with decreased risk of relapse at any dose.