A release clause, reportedly worth €7.5 million, was triggered by Gladbach to allow the Austrian to leave the Champions League-hopefuls.
Gladbach had been looking for a successor for Borussia Dortmund-bound Marco Rose. They had also recently been linked with Real Sociedad B coach Xabi Alonso.
"We are delighted about Adi Hutter's commitment," Gladbach sporting executive Max Eberl said in a statement.
"For our squad and for our club he is the best coach from summer on to achieve the challenges and goals ahead of us."
Hutter's tenure at Frankfurt has been highly successful since he joined from Young Boys in 2018.
He reached the Europa League last four in 2019 and this season is on course for a first ever Champions League qualification for Frankfurt.
"The decision to open a new chapter in the coming season was not an easy one for me," Hutter said in a statement released by Frankfurt.
"We still have an historic chance. Frankfurt's success is all that matters to me right now. We want to defend our lead and qualify for Champions League."
At the weekend, Frankfurt travel to Gladbach. They are fourth in the Bundesliga table and hold a seven-point lead on Dortmund with just six match days left to be played.
Gladbach are eighth but only behind Union Berlin on goal difference.
That place will secure a place in the playoffs for the newly founded UEFA Conference League next terms should RB Leipzig and Dortmund meet in the German Cup final in May.