The 32-year-old was an inspiration for the Norwich City side that won promotion to the Premiership last season.
Hammers boss Alan Pardew says:
"Malky's strength, experience and presence will prove of enormous value to West Ham's push for the Championship title.
"I'm delighted we have won the chase to bring him to Upton Park."
Malky himself says:
"West Ham is a massive club and when I was told the club was accepting offers for me you look onwards and upwards - and I jumped at the chance to come here."
Fact File:
Born in Bellshill on 19th February 1972, Malky Mackay is a natural leader and has worn the captain's armband at Norwich City with great pride.
At 6ft 3ins, Malky is a rugged, no-nonsense central-defender, who dominates in the air.
Born into a football family, his father played centre-half for Queens Park, Malky started as a youth with that famous Scottish amateur club, graduating to their league side in 1990.
After three years and 70 League appearances as a regular for the Spiders, he was signed by Celtic in the summer of 1993 and turned professional.
After 37 League games and four goals for Celtic he joined Norwich City for an unbelievable £350,000 in September 1998, surely one of the bargain buys of recent years.
Deadly with his head in attacking situations, Malky scored 15 goals in 212 League appearances for Norwich City up to the start of this season.
A great influence and inspiration at Norwich City and one of the main reasons why the club won promotion to the Premiership last season.
He was one of two Norwich players named in the PFA Division One team, voted for by their members, last season, while goalkeeper Robert Green was the other.
Malky has won four full caps for Scotland.