Mr McFarlane, who has been at the head of Australia's third largest bank for nine years, is set to be replaced at that time, although the terms of his extended contract allow him to remain in the chief executive post into 2008 if this is required for a smooth succession.
The announcement by ANZ ends uncertainty about the future of Mr McFarlane, with many investors reportedly hoping that he would remain as chief executive for longer.
During his tenure, Mr McFarlane has been credited with doubling the bank's share price and expanding its operations across Asia.
"It is important that the CEO of any company does not stay too long," McFarlane said in a statement.
"It was always intended that I would retire at the end of my current three year contract, subject to an orderly transition, and this remains the case."
The search for the new chief executive is apparently already underway, with executive search firm Whitehead Mann recruited to help, Bloomberg News reports.