Leverkusen - who can still win a treble of the Bundesliga, Europa League and DFB-Pokal - were dominant throughout the 90 minutes against the Hammers in the Europa League quarter-final, although they needed two late goals, both from substitutes, to get over the line.
Alejandro Grimaldo unleashed a fierce effort from range 20 minutes in, but he was denied by an exceptional save from Lukasz Fabianski.
Soon after, West Ham were dealt a bitter blow as Lucas Paqueta was shown a yellow card for a reckless challenge, meaning he will be suspended from the second leg.
Fabianski made another excellent save on the half-hour mark, denying Patrik Schick, and the two teams subsequently went in level.
In a second half short on gilt-edged chances, Fabianski was called on again in the 70th minute, and he pulled out a superb save to divert a Schick header over the bar.
But his resistance was broken eventually, as from a corner, a shot was blocked and dropped to substitute Jonas Hofmann, who volleyed home through a clutch of bodies, with Fabianski unsighted.
And another sub, Victor Boniface, added a second late on with a header from a corner, meaning Leverkusen remain firmly on course for a historic treble. The Hammers have a mountain to climb.