He has made 155 appearances for the Lions since signing from MK Dons for an undisclosed fee in January 2014.
The 30-year-old played 56 games in all competitions last season.
"Having such success last season made it an easy decision for me to sign another contract," Williams told the club website.
Millwall midfielder Shaun Williams has signed a 12-month contract extension with the newly-promoted Championship club, with an option for an extra year.