A blunder by Cottagers goalkeeper Tony Warner diverted Mido's weak shot in and Boro won it with two minutes to go thanks to Lee Cattermole's cool finish.
"As soon as Mido went into the dressing room I could see the influence he was going to have at the club," Middlesbrough manager Gareth Southgate said.
England midfielder Kieron Dyer made his debut for West Ham United at Birmingham City after completing his transfer from Newcastle United.
But it was the Hammers' Mark Noble who stole the limelight with a 70th minute penalty, the only goal of the game.
"We are a pacy side who have got the ability to break and the confidence came back when we got going," West Ham boss Alan Curbishley said.
Newcastle United have not scored at home since February and there was no danger of that changing as the Magpies ground to a goalless draw with Aston Villa.
England striker Michael Owen made a welcome return from injury in Sam Allardyce's first league match at St James' Park as Newcastle manager.
"It could be five or six games before you see the sharp end of Michael Owen," Allardyce said.



