Gus Poyet's side went down to nine men and the manager stormed down the tunnel before re-emerging to lead sarcastic applause of referee Craig Pawson.
Romain Vincelot was dismissed for foul and abusive language after six minutes and Ashley Barnes followed on 12 after an altercation with Chris McCann.
The Seagulls' resistance was broken in the 32nd minute when Kieran Trippie's shot found the net.
Boro's Bart Ogbeche opened the scoring with the aid of a deflection seconds after Cardiff were denied what looked like a stonewall penalty when Jason Steele appeared to foul Kevin McNaughton.
Papa Bouba Diop took advantage of a free header to give the Hammers the only goal of the game after six minutes.
At the foot of the table, rock-bottom Coventry lost 1-0 at Peterborough to Emile Sinclair's goal, while Bristol City drew 0-0 with fellow strugglers Nottingham Forest after David James turned back the years to deny Steve Cotterill's side a much-needed three points.
Elsewhere, Billy Sharp scored twice as Doncaster came from behind to beat Leicester 2-1 after David Nugent gave the Foxes the lead, while Simon Church's second minute goal for Reading proved enough to down Leeds 1-0.
Robert Koren had a hand in both Hull goals as they beat Millwall 2-0. The Slovenian's cross on 54 struck the luckless Jack Smith and bounced home before Koren volleyed a second with 10 minutes remaining.