The 21-year-old bolsters Darren Way’s defensive options ahead of Saturday’s match against Coventry City.
Lewisham-born Nelson joined the Lions Academy aged eight, and signed his first professional contract in 2014 after captaining the London club’s youth team.
He made his Sky Bet Championship debut in December of that year and went on to be a mainstay in the Millwall side.
The big centre-back spent two further seasons in the heart of Neil Harris’ backline before gaining experience on loan at Newport County last term.
Nelson made 14 appearances for the Exiles and played a key part in their EFL survival.
He becomes Yeovil’s 12th signing of the summer and has been handed squad number 25.
“Sid has already had a competitive run of games in the Championship,” boss Darren Way told YTFC.net.
“He has good leadership skills and is someone who enjoys defending.
“I’m really pleased the deal has finally been agreed as we’ve been in discussions with Millwall for a number of weeks.
“A big thanks to them and Neil Harris for allowing the move to happen.”
Are you interested in sponsoring Sid? Please email Commercial Manager Dave Linney (DLinney@YTFC.net).