The former Australia hooker's departure comes a day after chairman Edwin Zemancheff resigned, while long-serving team manager Chris Webb has already left the beleaguered province.
Foley, who led the Tahs through a poor 2012 campaign that yielded just four Super 15 wins and ended with an eight-game losing streak, has repeatedly denied reports he was considering a move to the west in recent weeks.
"I'd like to thank the organisation and team for their support throughout my time here, particularly over the past season," he said.
"While it's been a challenging season for everyone, being involved over the last four years has been extremely rewarding, particularly being part of a team that was able to play in two finals series.
"I believe that the squad and organisation has the potential to turn it around and I wish everyone the best for next season."
Board member and former Wallaby Al Baxter added: "On behalf of everyone involved with the Waratahs, I would like to thank Michael Foley for his dedication and commitment to the team and the organisation, not just over the past year but throughout his time with NSW.
"We firmly believe that this position is a highly sought-after role and will begin the appointment process with immediate effort."