Objective: To study the analgesic effect of transversus abdominis plane block (TAPB) and quadratus lumborum block (QLB) on postpartum caesarean section of human immunodeficiency virus (HIV) -infected pregnant women and its influence on cellular immunity. Methods: Sixty HIV-infected pregnant women who underwent cesarean section in Chongqing Public Health Medical Center, aged 22-32, body mass index (BMI) 18-25 kg/m2, ASA II. They were randomly divided into TAPB group and QLB group, with 30cases in each group. Both groups were treated with combined spinal-epidural anesthesia, and underwent patient controlled i.v. analgesia (PCIA) after operation. The QLB group underwent ultrasound-guided bilateral QLB, and ultrasound-guided TAPB was conducted in TAPB group. The scores of resting VAS were recorded at 4 h, 8 h, 12 h, 24 h, 36 h after operation. The levels of interleukin (IL) -2, IL-13, interferon-γ (IFN-γ), CD3+, CD4+, CD8+ and CD4+/CD8+ in peripheral blood were observed by 1 day before the operation and 1 day, 2 days and 3 days after the operation. And the first compression time of the analgesic pump, the number of postoperative salvage analgesia cases, the success rate of one puncture and adverse anesthesia reactions. Results: Compared with the TAPB group at 4 h, 8 h, 12 h, 24 h, and 36 h after surgery, the static VAS pain scores in the QLB group were significantly lower at each time point (P<0.05). Compared with the TAPB group 1 day, 2 days and 3 days after the operation, the IL-2, IL-13, IFN-γ concentration, CD4+ and CD4+/CD8+ in the QLB group were significantly increased at each time point (P<0.05). The first compression time of the analgesic pump in the QLB group was significantly later than that in the TAPB group (P<0.05), and the rate of remedial analgesia was significantly lower than that in the TAPB group (P<0.05). Conclusion: Post-operative cesarean section for HIV-infected pregnant women has better analgesia effect with QLB and can reduce the impact on the cellular immunity.