Mido was fed by Edgar Davids on the edge of the area but he eluded his marker before firing home from a tight angle.
The Egyptian international striker erupted in ecstasy after finding the net for the first time this season and took off his jersey in celebration only to be handed a yellow card.
He came close from doubling his tally after the break when he steered a marvelous header from an Aaron Lennon cross but saw his effort denied by the woodwork.
Hossam Ghaly, who scored during Tottenham's 2-0 triumph over Besiktas in the UEFA Cup last week, came off the bench in the 76th minute, replacing England international Lennon.
The win moved Tottenham up to 13th spot with 11 points. West Ham are second from bottom on five points.
A melee erupted in the first-half when West Ham's Argentinean midfielder Javier Mascherano tackled Jermain Defoe from behind as both players were left on the ground.
Defoe moved his head towards Mascherano, who alleged to be assaulted by England striker, triggering widespread reactions from players of both teams.
But Mido provided a good piece of football in the 45th minute when he scored his side's eventual winner.
With his back to the goal, Mido received Davids low pass from the left, lift the ball slightly to spin past marker Anton Ferdinand and sent a venomous left-footer into the far corner.