The school community had repeatedly called for Dr Davies to stand down, accusing the headmaster of prioritising the academic performance of boys over their wellbeing.
School council chair John Gillam said the school had found a new leader to deliver on Trinity’s commitment to holistic education.
“Adrian’s experience and credentials are outstanding,” he said.
“His focus on developing the whole person shows how closely aligned he is to what our school community considers critical in education: a balance across academic, cocurricular and wellbeing programs.”
Mr Farrer, who was educated at Melbourne Grammar School, said he was looking forward to moving back to Melbourne with his family and becoming part of the Trinity community.
“Trinity Grammar is one of Australia’s finest schools, with a long, proud history of nurturing well-balanced boys who make great contributions to society,” he said.
“What I know of Trinity boys is that they are grounded, humble and respectful, as well as articulate and confident.”
Mr Farrer, who will start his new job in January, has worked at Penleigh and Essendon Grammar School and Camberwell Grammar School.
Former Carey Grammar principal Phil De Young took on the role of interim headmaster while the school council conducted an international search for a permanent headmaster.
He described Mr Farrer as a “strong, innovative and holistic” educator.
Mr Brown was given his job back last year after an independent review by former Federal Court judge Ray Finkelstein, QC, and barrister Renee Enbom, found the school’s decision to dismiss him was unjustified.
Education Editor at The Age