Wright joined the Ladbrokes Premiership club in November 2011 as assistant manager before taking the hotseat in June 2013.
The Northern Irishman led the Perth side to their first-ever Scottish Cup success in 2014 and guided the club to several top-six places.
St Johnstone reached the Europa League qualifying rounds on four occasions under Wright but could not make the group stages.
Wright had two years left on his contract but the club admitted that they had planned for the 56-year-old to leave at the end of the campaign and felt that "now would be an appropriate time" to part company.
Wright said in a statement on St Johnstone's official website: "I've had a fantastic journey with the club and I would like to personally thank Steve, Stan and Charlie for their continued support during my time as manager.
"I would also like to thank all the staff and players that have been on this journey during my time at the club.
"Finally, I want to take the opportunity to say that the support I have had from the fans has been incredible and contributed immensely to my experience with the club.
"So, to the club, its staff, players and fans – I'll always hold a very special place for you all and I look forward to coming back to McDiarmid Park – I am so proud of what we have achieved together.
"We have an exciting group of young players and I look forward to seeing their progression with you all."