It depends on the type of fentanyl you are taking. An injection of fentanyl into a vein provides the fastest pain relief. It works almost immediately and is usually only given in the hospital. Fast-acting fentanyl tablets, lozenges and nasal sprays take about 15 to 30 minutes to work, but they wear off after 4 to 6 hours.