Shoulder pain frequently follows hepatectomy. However, the influence of surgical procedures on shoulder pain is unclear. In this observational study, patients who underwent hepatectomy were enrolled in Shanghai Cancer Center. Shoulder pain and surgical pain were assessed using the numeric rating scale 2 days after surgery. The incidence of shoulder pain was the outcome of the cohort study. Nested case–control analyses were further applied. Three hundred and twelve patients were finally enrolled in this study. Nested case–control analysis showed that there were no significant differences in the number of surgical segments between the two groups (P= 0.09). In addition, minor hepatectomy did not reduce the incidence of shoulder pain compared with major hepatectomy (P= 0.37). The drainage volume within 2 days after surgery was significantly more in those patients with shoulder pain (P= 0.017). In open surgery, surgical sites involving the right anterior lobe (OR (95% CI) 2.021 (1.075, 3.802),P= 0.029) and right posterior lobe (OR (95% CI) 2.322 (1.193, 4.522),P= 0.013) were both independent risk factors for shoulder pain. Left shoulder pain also occurred in patients who did not receive left lateral hepatectomy. The preventive phrenic nerve block was not suitable for post-hepatectomy shoulder pain. Stronger preventative intervention should be used in those high-risk patients.