The defender was out of contract after seven years with the Welsh side, but penned a new deal which will see him play in the Premier League for the first time in his career.
The 30-year-old told the club's website: "I'm delighted to have committed my future to the club and I'm buzzing for the challenge ahead.
"There was a decision to be made this summer as I want to play first-team football. I know that I've a lot of hard work to do to make sure I can achieve that here, but I'm ready for it.
"I didn't want to look back at the end of my career and think that I never gave the Premier League a crack with Cardiff City."
The Scot joined Cardiff in 2006, after six seasons with Aberdeen.