David Moyes' side will face Olympique Lyonnais in the last eight, with the first leg being played at the London Stadium on Thursday, April 7.
Should they progress against Lyon, the Hammers be pitted against either Eintracht Frankfurt or Barcelona in the last four, meaning that their route to the showpiece event in Sevilla is now set.
The Hammers will be brimming with confidence after recording an extra-time victory over Sevilla at the London Stadium on Thursday night night, a result that saw supporters elated at the prospect of rubbing shoulders with Europe's elite.
It was a poignant moment that won it in east London, with Andriy Yarmolenko scoring the decisive goal before gifting his jersey to a supporter who was sporting a Ukraine flag in the stands.
Rangers will also face a tough test after being drawn against SC Braga in the last eight.
The Scottish champions overcame the challenge of Red Star Belgrade on Thursday evening, leaving supporters dreaming of what could be.
Should they be able to overcome the Portuguese side, Rangers will face either RB Leipzig or Atalanta in the semi-finals of the competition.
Quarter-final matches will be played on April 7 and April 14, with the semi-finals taking place on April 28 and May 5.
The Europa League final will take place on May 18 at the Ramón Sánchez-Pizjuán Stadium in Sevilla.
Europa League quarter final draw
RB Leipzig v Atalanta
Eintracht Frankfurt v Barcelona
West Ham v Olympique Lyonnais
SC Braga v Rangers
Europa League semi final draw
Semi-final 1: RB Leipzig/Atalanta v SC Braga/Rangers
Semi-final 2: West Ham/Olympique Lyonnais v Eintracht Frankfurt/Barcelona
Europa League final
Winner of semi-final 2 v Winner of semi-final 1