The 27-year-old was a regular starter for the Bluebirds after joining them from Middlesbrough in 2011 and made over 100 appearances for the Welsh club in all competitions.
However, the former England U21 international fell out of favour during last season’s Premier League campaign and Latics boss Uwe Rosler has now snapped him up.
Rosler told his club’s official website: “I’m very, very happy to get a player of Andrew’s stature and experience to our football club.
“He was the captain of Malky Mackay’s promotion-winning team, he is a very experienced and reliable player who is at the best stage of his career and I’m looking forward to working with him.
“He has all the qualities in his position that we are looking for; physically, technically he’s very good and tactically he has developed as a player well.”
Taylor said: “Wigan Athletic are a big club, with Premier League experience and big aspirations.
“The manager seems really good and I think his record when he came to the club last season speaks volumes.
“It’s a fresh challenge for me and one I’m very excited about; I had three good years at Cardiff but everything has to come to an end and I’m looking forward to getting started at the DW Stadium.”