The NSW Chief Justice, James Spigelman, has told the NSW Attorney-General that he is resigning after being the state's highest judge since 1998.
Spigelman, who is 65 years old, will be stepping down at the end of May.
"I believe that any organisation needs refreshing and, after 13 years, it also seems an appropriate time for me to personally and professionally refresh myself," he said.
He also thanked other judges, attorneys-general and staff with whom he had worked during his tenure, and said the highlights of his time in office included reducing court delays, increasing the courts' use of technology, and refurbishing the Supreme Court.
Spigelman said he plans to work on a "small portfolio of different roles" once retired.
James Allsop, the president of the Court of Appeal, is a leading contender to become Spigelman's successor.
The Law Society of NSW president, Stuart Westgarth, acknowledged the outstanding contribution of Spigelman, paying tribute to him by saying he had been an outstanding servant of the fair administration of justice and a defender of the profession and of the judiciary.
"As head of the nation's busiest court, Chief Justice Spigelman will be remembered for his service to the people of NSW, the judiciary and the legal profession and his commitment to the maintenance and enhancement of our system of justice in NSW," he said.
"We wish Chief Justice Spigelman all the best in his retirement. His departure after almost 40 years of service to the legal profession, including the past 13 years as chief justice, will be greatly felt."