Japan's Shinsei Bank is to buy UDC for $762 million, after an original deal to sell it to China's HNA Group for $660m was knocked back by the Overseas Investment Office in 2018.
ANZ had also toyed with floating UDC in a local share sale but reconsidered and last year decided to hold on to it.
"With a strong outlook for infrastructure and agriculture projects as the New Zealand economy rebuilds post-Covid-19, there is a significant role for UDC to play. As such, it needs an owner that can invest in and grow the business," chief executive Antonia Watson said.
Tokyo-based Shinsei is a diversified financial group with a wide range of banking, business and consumer lending in Japan and overseas.
"UDC will become a part of the Shinsei Bank Group, in line with our non-organic growth strategy in this business area," chief executive Hideyuki Kudo said.
Shinsei will keep UDC operating in its current form with all staff, and in time expected to inject more capital to fund growth.
Watson said the sale would eventually free up about $2 billion, which would be used to strengthen ANZ's local balance sheet.
ANZ would make a gain of $63m over UDC's book value, although that would turn into a $73m loss when goodwill was taken into account.
UDC has about $3.4bn of loans and advances, and posted a net half-year profit of more than $24m.