The 27-year-old has signed a three-year contract with Steve Bruce's side after falling down the pecking order at Upton Park.
He becomes the Tigers second signing on deadline day after it also agreed to a deal to bring Abel Hernandez to the club.
"I'm delighted to welcome Mohamed to the club," Bruce told Hull's official website. "His experience, both at international level and in the Premier League, will be invaluable for us as we look to cement our place in the top flight."
Diame went to England in 2009 after joining Wigan Athletic before moving to West Ham in 2012 on a free transfer. He went onto make 71 Premier League appearances for the Irons, scoring seven goals.
He now joins the Tigers and will compete with the likes of Tom Huddlestone and Jake Livermore for a place in the starting 11.