Spence, who can play at right-back or as a centre-half, will remain with the Milton Keynes club until November 23 and will make his full debut in the Dons' Sky Bet League One game at Tranmere on Saturday.
A decision has yet to be made on whether the 23-year-old will be able to play for Karl Robinson's team in the FA Cup.
The Dons were without as many as nine first-team players as they lost 1-0 at home to Carlisle on Tuesday night.
Spence, who has already had a loan spell away from Upton Park this season at Championship club Sheffield Wednesday, has made 10 appearances for the Hammers and has a further 50 Football League outings under his belt from loan spells with Leyton Orient, Scunthorpe, Bristol City and the Owls.
He has not played for West Ham this season, instead spending September at Wednesday where he featured four times.