Summary: Background: Convincing clinical evidence regarding completely opioid-free postoperative pain management using erector spinae plane block (ESPB) in patients undergoing open major hepatectomy (OMH) is lacking. Herein, we aimed to compare the postoperative analgesic efficacy of the visualised continuous opioid-free ESPB (VC-ESPB) and conventional intravenous opioid-based postoperative pain management in hepatocellular carcinoma (HCC) patients undergoing OMH. Methods: This open-label, randomised, controlled, non-inferiority trial enrolled patients with HCC undergone open major hepatectomy in Fujian Provincial Hospital and compared the postoperative analgesic efficacy of VC-ESPB (VC-ESPB group) and conventional intravenous opioid-based pain management regimen (conventional group). Patients were randomly assigned (1:1) to VC-ESPB group and conventional group. Patients were not masked to treatment allocation. The VC-ESPB group was treated with intermittent injections of 0.25% ropivacaine (bilateral, 30 mL each side) given every 12 h through catheters placed in the space of erector spinae and an opioid-free intravenous pump (10-mg tropisetron diluted to 100 mL with 0.9% normal saline [NS]) for postoperative pain management. The conventional group did not receive ESPB and was treated with a conventional intravenous opioid-based pump (2.5-μg/kg sufentanil and 10-mg tropisetron diluted to 100 mL with 0.9% NS). Patients in the VC-ESPB group underwent magnetic resonance imaging (MRI) to identify local anaesthetic diffusion after ESPB was performed under ultrasound guidance. The primary outcome was postoperative analgesic efficacy, which was indicated by the cumulative area under the curve (AUC) of the pain visual analogue scale scores (range, 0–10; a higher score indicates more pain) obtained at rest and at movement until 48 h postoperatively after leaving the post-anaesthesia care unit (PACU). Herein, an AUC of 26.5 was set as the noninferiority margin, which needed to be satisfied for both cumulative AUCPACU-48 h at rest and cumulative AUCPACU-48 h at movement. Per protocol participants were included in primary and safety analyses. This trial was registered with ChiCTR.org.cn (ChiCTR1900026583). Findings: Between October 30, 2019, and May 1, 2023, 106 patients were enrolled and randomly assigned to the VC-ESPB group (n = 53) and the conventional group (n = 53). After the dropout (n = 5), a total of 101 patients (VC-ESPB group, n = 50; conventional group, n = 51) were analysed. Both the level of cumulative AUCPACU-48 h (at rest: 160.08 ± 38.00 vs. 164.94 ± 31.00; difference [90% CI], −4.861 [−16.308, 6.585]) and cumulative AUCPACU-48 h (at movement: 209.64 ± 28.98 vs. 212.59 ± 33.11; difference [90% CI], −2.948 [−13.236, 7.339]) were similar between the VC-ESPB and control groups within the first postoperative 48 h. The upper limit of the 90% CIs for the difference in cumulative ACUPACU-48 h at rest and at movement did not reach the upper inferiority margin (26.5). During the first postoperative 48 h, the rate of nonsteroidal anti-inflammatory drug rescue analgesia was similar between the VC-ESPB group and conventional group (n = 16, 32.0% vs. n = 11, 21.6%; P = 0.236). Treatment-related death was not observed in the VC-ESPB group (n = 0, 0%) and conventional group (n = 0, 0%). In VC-ESPB group, local site paralysis (n = 1, 2.0%) was observed in one patient and rash (n = 1, 2.0%) was observed in another patient. One patient in the conventional group was observed with rash preoperatively (n = 1, 2.0%). The VC-ESPB group had significantly lower rates of postoperative nausea (n = 2, 4.0%, vs. n = 9, 17.6%, P = 0.028), vomiting (n = 1, 2.0% vs. n = 8, 15.7%, P = 0.031) and lower incidence of major complications (n = 4, 8.0% vs. n = 6, 11.8%; P = 0.033). Interpretation: This study demonstrates the noninferiority of VC-ESPB when compared with the conventional opioid-based approach for postoperative pain management after OMH, suggesting that it is feasible to achieve opioid-free postoperative pain management for OMH. Funding: The Joint Funds for the Innovation of Science and Technology, Fujian Province, China; the Youth Scientific Research Project of Fujian Provincial Health Commission; the Fujian Research and Training Grants for Young and Middle-aged Leaders in Healthcare; and the Key Clinical Specialty Discipline Construction Program of Fujian, China.