The 29-year-old has made more than 360 career appearances after coming through Swansea City's academy.
He has also played for Peterborough United, Ipswich Town and Crawley Town as well as having a loan spell at St Johnstone 10 years ago.
Edwards was part of the Wigan side that won League One in 2021-22 to take the Latics back to the Championship.
He has represented Wales at youth levels and has been called up to his country's senior squad but is yet to make his debut.
"We are delighted to add somebody of Gwion's calibre to our squad," manager Malky Mackay said.
"He has played over 360 games in English football for top sides and will add that really important experience and quality to our group.
"He is a player that we have been aware of for some time and it's great to now have him with us."