Spence will now stay with MK Dons until January 4.
Manager Karl Robinson said: "First of all we're thankful to West Ham United and their manager Sam Allardyce for allowing us to keep him until the new year.
"He's done wonderfully well since signing for us and we're very fortunate to have him until January. He is a typical MK Dons centre-back and they are hard to find.
"This now gives us consistency in the back four and it's important over the forthcoming weeks and months while Antony Kay is out, that he'll be there to fill that void."
For breaking stories and all the great banter like us on Facebook: facebook.com/tribalfootball