News of the deal comes after Ten Hag led Ajax to an unlikely journey to the Champions League semifinal after knocking out European giants such as Real Madrid and Juventus before being eliminated by Tottenham.
He also led Ajax to their first Eredivisie title since 2014 during his first full season in charge.
"The results we have achieved so far have been fantastic," Ten Hag said, as translated by BBC Sport.
"It will be a hell of a job to repeat that. But we will set our goals again and go for results again."
Ten Hag was appointed as the manager of Ajax in 2017 after a two-year stint with FC Utrecht.