Vardy put Leicester ahead after a lightning counter-attack in the 18th minute with a left-foot shot into the corner of the net before picking up his first booking for a late challenge on Cheikhou Kouyate.
He picked up his second yellow card for a dive early in the second half and West Ham gradually came back into the game against Leicester's 10 men, equalising through an 84th-minute Andy Carroll penalty after Wes Morgan hauled down Winston Reid.
Two minutes later Aaron Cresswell scored a stunning goal for the Hammers with a fierce shot from the edge of the box which flew past keeper Kasper Schmeichel, but Leicester equalised with virtually the last kick of the game when Leonardo Ulloa scored from the spot after Carroll fouled Jeffrey Schlupp.