Pratley made 179 appearances for the Welsh club and scored 27 goals, including a stunning strike in the second leg of their Championship play-off semi-final win over Nottingham Forest.
He said: "I'd like to thank the chairman Huw Jenkins, manager Brendan Rodgers and especially the fans for a wonderful five years with the club.
"But I feel the time is right for a fresh challenge.
"It's been a difficult decision for me and my family to make because Swansea is a fantastic club with such friendly and passionate supporters.
"It's not going to be easy for me but if there was a good time to leave then it's now, with the club having secured their place in the Premier League."