Objective. To investigate the effects of different doses of hydromorphone under the guidance of ultrasound on ropivacaine blocking the superior inguinal iliac fascia and postoperative analgesia. Methods. From January 2020 to June 2021, 90 American Society of Anesthesiologists (ASA) I-II patients undergoing elective total hip arthroplasty (THA) were selected and randomly divided into 3 groups, 30 patients in each one. Ultrasound-guided superior inguinal iliac fascia block was performed in the patients of the 3 groups before operation. The L group: 0.3% ropivacaine 30 ml; the H1 group: 0.3% ropivacaine + 25 μg/kg hydromorphone 30 ml; the H2 group: 0.3% ropivacaine + 50 μg/kg hydromorphone 30 ml. The time until the occurrence of pain, pain intensity, sufentanil remedial dose, the number of PCIA presses, and effective times were compared among the 3 groups. The VAS and Ramsay scores of 3 groups were recorded at 12 h, 24 h, 36 h, and 48 h after operation. Results. The time from the end of surgery to the appearance of pain in the H2 group was higher than that in the H1 group and the L group, and the time in the H1 group was higher than that in the L group (
P
<
0.05
). The VAS score in the H2 group was lower than that in the H1 group and the L group, and the VAS score in the H1 group was lower than that in the L group (
P
<
0.05
). The VAS scores of 12 h, 24 h, 36 h, and 48 h after operation in the H2 group were lower than those of the H1 group and the L group, and the H1 group was lower than the L group (
P
<
0.05
). The Ramsay scores at 12 h, 24 h, 36 h, and 48 h after operation in the H2 group and the H1 group were higher than those in the L group (
P
<
0.05
), and the difference was not statistically significant in the H2 group and the H1 group (
P
>
0.05
). The remedial dosage of sufentanil, times of PCIA compression, and effective times in the H2 group were lower than those in the H1 group and the L group, and the level in the H1 group was lower than that in the L group (
P
<
0.05
). The incidence rates of adverse reactions in the L group, the H1 group, and the H2 group were 13.33%, 23.33%, and 30.00%, respectively. There was no significant difference in the incidence rate of adverse reactions among the 3 groups (
P
>
0.05
). Conclusion. 25 μg/kg and 50 μg/kg hydromorphone used in the ultrasound-guided superior inguinal iliac fascia block can enhance the time effect of ropivacaine and improve analgesic effects, with good safety. In addition, time effect and analgesic effect of 50 μg/kg hydromorphone in enhancing ropivacaine were more obvious.