The 29-year-old winger was one of the first signings following the arrival of Richardson and Paul Cook in the summer of 2017.
He went on to make 165 appearances for Latics, scoring 13 times, and was part of the League One title successes in 2017-18 and 2021-22.
Massey stands 40th on the club’s all-time league appearance list.
“It has been a pleasure to work with Gav throughout the past five seasons,” said Richardson.
"He has played an important role in all the successes we have experienced since 2017.
“Gavin has been excellent for us whenever he has been called upon and never been a moment’s trouble behind the scenes.
“Clearly, it is never nice to say goodbye as we both move in different directions.
"But I am sure our supporters would agree Gav and his family will always be welcome back at the DW.
“On behalf of all the staff, I would like to wish him well in the future and thank him for his efforts during his time here.”
The undoubted highlight of his stay was his brace at Leeds on Good Friday 2019, when 10-man Latics stunned the hosts to all-but secure safety from relegation.
"Been an unbelievable ride," Massey confirmed on Instagram. "Spent some great years at this club and experienced some of the best memories.
"From FA Cup runs to two league titles. I've played in some great teams and with some great individuals on top of that.
"All the staff have helped me so much along the way and I can't thank everyone enough.
"Thank you to all the fans for making me feel so welcomed since day one.
"The club's back where it belongs and I wish you all the best in the future."