Ainsley, who was born in Otago but earned three test caps in 2018 under former Australia coach Michael Cheika, will see out his second season with the Rebels before joining the Highlanders in 2021.
"Even though Jermaine is only 24 he already has a wealth of experience with over 50 Super Rugby games and also some exposure at test level," Highlanders coach Aaron Mauger said today.
"The fact that he has a strong link with our region and club history makes it all the better."
Ainsley is the son of former All Black and Otago prop Joe McDonnell, who played eight tests.
The tighthead's departure robs incoming Wallabies coach Dave Rennie of a front row option with test experience following Sekope Kepu's international retirement after the 2019 World Cup.
Overseas-based players need at least 60 test caps to be eligible for a Wallabies jersey.
"I’m very excited to be coming home and be surrounded by family," Ainsley said.
"Can’t wait to play Super Rugby in New Zealand, it’s a dream come true."
Ainsley is the latest player to leave Australian rugby as the domestic game struggles to secure its future following the suspension of Super Rugby in March due to the Covid-19 pandemic.
New Zealand Rugby, which welcomed the return of the professional game over the weekend with the opening round of its domestic "Super Rugby Aotearoa" competition in Dunedin and Auckland, said today that All Blacks and Blues lock Patrick Tuipulotu had signed a contract extension through to 2023.
The deal keeps the Blues captain in New Zealand through to the 2023 World Cup in France.
"This is fantastic news for New Zealand Rugby and the Blues," All Blacks coach Ian Foster said of the 27-year-old's deal.