The 25-year-old had revealed his desire to leave the Amsterdam ArenA in May after ending the 2017-18 Eredivisie campaign with nine goals and 15 assists.
"I know he already has another deal elsewhere," Ten Hag told Voetbal International.
"I would have liked to keep him, but the agreements between him and the club are there. The only thing I can do is wish him good luck at his new club.
"If you love football, you'll love Hakim Ziyech. Aside from his technical qualities, it's his footballing intelligence that makes him so strong.
"I have to be careful that I do not talk too much in superlatives, but it is just a fact that a footballer with his qualities would not stay in the Netherlands."
Ziyech was awarded Ajax's Player of the Season award last term and played in all of Morocco's group matches at the World Cup in Russia.