Mr McFarlane, who was appointed to the role in 2014, will step down in May 2019. He is to be replaced by Nigel Higgins, who is currently deputy chairman of Rothschild.
Mr Higgins said: “Succeeding John McFarlane, who has done such a sterling job during a period of great change at Barclays, is a huge honour.
"I have been lucky enough to enjoy 36 years at Rothschild, working with many wonderful colleagues and clients, and particularly lucky to lead the firm for a decade or so.
“I now look forward to joining another great institution and to working closely with its executive management team, led by Jes Staley, and my fellow non-executive directors.”
Mr McFarlane said: “Whilst it is always a difficult choice to retire from a company as prestigious as Barclays, I am delighted that the board has appointed Nigel Higgins to succeed me as chairman.
“I have every confidence that Nigel will be a superb steward of the board and the bank as Barclays continues to progress following the substantial restructuring of the past few years, and I look forward to welcoming him when he joins our ranks in March."
Mr McFarlane joined Barclays from insurer Aviva, where he oversaw a turnaround after investors turned on the company’s management.
He earned the nickname ‘Mack the Knife’ during his time as chief executive of Australia and New Zealand Banking Group, where he reduced the investment bank to focus on its retail banking division, which led to the share price tripling.
Shares in Barclays were up 1.45 per cent in early trading on Friday.
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies