Introduction: Deep and long-lasting anesthesia is essential throughout endodontic treatment. This study was conducted to compare the effect of adding fentanyl to epinephrine-containing lidocaine on depth and duration of local anesthesia in painful maxillary molars with irreversible pulpitis (IRP). Methods and Materials: This randomized double-blind, clinical trial with parallel design was conducted on 61 healthy volunteers; the control group received a mixture of normal saline and 2% lidocaine with 1:80000 epinephrine and the experimental group received a mixture of fentanyl and 2% lidocaine with 1:80000 epinephrine. The depth and duration of pulpal anesthesia were evaluated by means of electric pulp testing in 5-min intervals during a period of 60 min. Pain intensity was recorded five times: before injection, after injection, during access cavity preparation, initial file placement and pulpectomy using visual analog scale (VAS). All data were analyzed and compared using the chi-square and Mann-Whitney tests. Results: Except for one patient in the control group, all others had deep and long-lasting anesthesia. The difference between pain intensity of the control and experimental groups was not statistically significant (P>0.05). Conclusion: Addition of fentanyl to conventional local anesthetic solution did not increase the effectiveness of infiltration in patients diagnosed with IRP.