Chelsea, who paid heartfelt tribute to their late captain Ray Wilkins before and during the game, dominated the opening 45 minutes and were deservedly ahead when Azpilicueta tapped home from close range in the 36th minute.
Antonio Conte’s side’s dominance continued after the break but the second goal never came as West Ham stayed in the game, and they were rewarded when substitute Hernandez (73) snatched a point for the visitors.
The draw sees David Moyes’ side move six points clear of the relegation zone, while Chelsea are 10 points behind Tottenham in the race for fourth with six games remaining.
On what was an emotional afternoon at Stamford Bridge, Wilkins was remembered ahead of kick-off with a minute of applause as a seat in the dugout was draped in his No 8 shirt. Wilkins’ name rang around the ground once again in the eighth minute with both sets of fans singing the Chelsea legend’s name.
After a quiet opening, Chelsea had the ball in the back of the net in the 25th minute but Alvaro Morata was correctly flagged for offside after being played in by Eden Hazard.
Morata’s flick then drifted wide of the far post after yet more good work from Hazard before Willian fired inches wide from the edge of the penalty area, and the Brazil international was in again in the 35th minute after yet more sensational passing from Chelsea but Joe Hart raced off his line to make a brilliant block.
Chelsea’ dominance eventually told from the resultant corner and West Ham switched off as Morata headed Victor Moses’ cross back into the danger area where Azpilicueta was there tap home from inside the six-yard box.