Background and objectives Quadratus lumborum (QL) block is a new regional analgesic technique for upper and lower abdominal surgeries as part of a multimodal analgesic regime. It has also been reported to relieve pain after total hip arthroplasty (THA). In this prospective, randomized, double-blind study, we compared QL block with control (no block) in patients undergoing primary THA. Methods Eighty patients undergoing primary THA surgery under spinal anesthesia were randomized into two groups, one with and one without QL block. The patients in both groups were randomized after sedation, positioning and ultrasound scanning. Both the patient and the researcher collecting data were blinded to the patient's group assignment. Opioid consumption and visual analog scores (VAS) pain scores were measured at 12, 24, and 48 hours after surgery. Also, the ambulation distance, patient satisfaction, and length of stay were recorded. Results The study analysis included 36 patients in the QL group and 35 patients in the control group. Both VAS pain score at 24 hours (difference-1.76, 95% CI-2.87 to-0.64) and cumulative opioid consumption were significantly lower in the QL group at 12, 12-24, 24, 24-48, and 48 hours after surgery as compared with the control group (difference at 48 hours-36.13, 95% CI-62.89 to-9.37) (p<0.05). However, there was no difference in pain score at 12 and 48 hours, nor in the ambulation distance and duration of hospital stay between the two groups. The patient satisfaction score was significantly higher in the QL group. Conclusions Our preliminary data show that the QL block provided effective analgesia and decreased opioid requirements up to 48 hours after primary THA.