Edwards ends five years with Blues to sign for Millwall
The 35-year-old Trinidad and Tobago international spent the last two months of the season on loan at the New Den and was a regular in their side with Ian Holloway using him at right-back.
He scored one goal in his eight appearances for the Lions and played his part as they beat the drop to League One.
Edwards joined Town from Sunderland in August 2009 and went on to play 191 times for Blues, scoring 10 goals.
He was handed the captaincy under previous Town boss Paul Jewell and kept the armband when Mick McCarthy took over but he featured only 10 times for Blues in 2013/14.
The former Wrexham and Luton midfielder was named Player of the Year by his team-mates in 2011/12.
“Carlos has been a great servant to the Football Club and we wish him well,” said Town boss Mick McCarthy.