Lameness, mostly resulting from claw lesions, causes major welfare problems in the dairy industry. One way to prevent claw lesions is hoof trimming, but the overall effect and the optimal hoof trimming frequency are unknown. In a retrospective cohort study, we investigated the association between hoof trimming frequency in primiparous cows and hoof health and culling in second lactation. We based our analysis on breed, calving and culling data in the period 2015-2018 for 30,613 primiparous cows in 202 Swedish dairy herds. Of the cows enrolled, 20% were not hoof-trimmed, 30% were trimmed once, 34% were trimmed twice, 13% were trimmed 3 times, and 2% were trimmed ≥ 4 times. We used multivariable mixed-effect logistic and multivariable multinomial logistic regression models to investigate the association between trimming frequency and 2 outcomes: hoof lesions at first trimming occasion within 90 d from second calving and culling in second lactation within 300 d after second calving. In general, cows trimmed 2 or 3 times during first lactation were at lower odds of having claw lesions compared with cows that were not trimmed (Odds Ratio (OR) = 0.66, 95% CI = 0.62-0.71 and 0.60, 95% CI = 0.55-0.66, respectively) or cows trimmed once (OR = 0.80, 95% CI = 0.75-0.85 and OR = 0.72, 95% CI = 0.66-0.79, respectively), and this beneficial effect was observed for most types of claw lesions. Moreover, cows trimmed 2, 3, or ≥ 4 times were at lower odds of being culled compared with cows that were not trimmed (OR = 0.71, 95% CI = 0.65-0.77, 0.68, 95% CI = 0.61-0.76 and 0.70, 95% CI = 0.54-0.90, respectively) or trimmed once (OR = 0.77, 95% CI = 0.71-0.83, OR = 0.74, 95% CI = 0.66-0.82 and OR = 0.75, 95% CI = 0.59-0.97, respectively). In particular, 2 trimmings, compared with 1 or no trimming, lowered the relative risk-ratio of dying or being euthanized on-farm, or being culled due to claw and leg disorders. More than 1 hoof trimming in first lactation also reduced the relative-risk ratio of being culled for other reasons. In conclusion, 2 or 3 hoof trimmings during first lactation were generally beneficial for hoof health in early second lactation and survival in second lactation. These findings can help improve animal welfare and production by reducing claw lesions, and thereby lameness among dairy cows, which would increase the longevity of dairy cows and the sustainability of the dairy industry.