Born in Hong Kong, Andrew Li received his early education at St. Paul's Co-educational College, and then at Repton School in Derbyshire, England. He earned an MA and LLM from the University of Cambridge, where he was a scholar at Fitzwilliam College.
Li was called to the Middle Temple in 1970, and the Hong Kong Bar in 1973. His first ever pupil was Audrey Eu, who commenced her pupillage in 1978. Her brother and senior counsel Benjamin Yu was also Li's pupil. Former Secretary for Justice Wong Yan Lung was Li's last pupil. In 1988, he was appointed Queen's Counsel.
He was appointed a Deputy Judge of the District Court of Hong Kong in 1982 and a Deputy High Court Judge in 1991. In 1997, Li was elevated to Chief Justice by Tung Chee-Hwa, the first chief executive of Hong Kong after the handover. There he developed a moderate jurisprudence and was a consensus builder in the Court of Final Appeal.
In 1999, he gave the leading judgment in Ng Ka Ling and Others v. Director of Immigration, which was at the centre of the right of abode controversy.
In 2000, Li set up a working party, consisting of judges, lawyers and academics, to introduce reforms on minimising the complexity of High Court civil litigation procedures, widening judges' discretionary powers to manage the progress of cases and requiring lawyers to justify their charges. An interim report was released in 2001, containing 80 recommendations, some of which mirror those in the Woolf Reforms in England. Known as the Civil Justice Reform, the final report was released on 3 March 2004, setting out 150 recommendations. It has come into effect on 2 April 2009.
In 2008, Li received the Grand Bauhinia Medal.
Li announced his decision to resign early from his position as Chief Justice on 25 August 2009, ceasing service on 31 August 2010 and commencing pre-retirement leave on 1 September 2010, three years before retirement age. He would leave public life upon retirement. Li's announcement that he intended to take early retirement came as a surprise, prompting widespread speculation that there had been pressure from Beijing, according to the South China Morning Post. Li, however, stressed his retirement was in the best interests of the judiciary and would be conducive to orderly succession planning of the judiciary as three other permanent judges on the Court of Final Appeal were to reach retirement age between 2012 and 2014. He also said the judiciary had been under his leadership for 13 years, which was a long time, and that retirement was consistent with his personal wishes. He dismissed speculation that he resigned due to political pressure.
On 18 February 2010, Li achieved the highest score ever recorded (68.1) by the University of Hong Kong Public Opinion Programme.
On 8 April 2010, it was announced that Chief Executive Donald Tsang had accepted the recommendation of the Judicial Officers Recommendation Commission to appoint Geoffrey Ma as Li's successor. On 9 June 2010, Ma was formally endorsed unanimously by Hong Kong legislators. But pro-democracy members remained concerned at the implications of Li's resignation. Margaret Ng said: "The public is deeply worried that [Li's resignation] signals an era in which judicial independence will gradually yield to the influence and intervention of Beijing ... but I believe the challenges have always been there, openly at times, but unceasingly as an undercurrent." Emily Lau said many people were unnerved by Li's decision to resign, and that "Hong Kong cannot afford another surprise resignation."
On 17 July 2010, a farewell ceremony was held for Li. It was attended by judges and lawyers, including representatives of the Law Society of Hong Kong and the Bar Association.
Li was appointed justice of the peace in 1985. In 1992, he was appointed member at-large of the Executive Council of Chris Patten (later Lord Patten), the last British governor of Hong Kong, and was appointed Commander of the Order of British Empire the same year.
Li has also served as the Deputy Chairman of the Inland Revenue Board of Review, the Securities Commission, the Law Reform Commission, the Standing Committee on Company Law Reform, the Banking Advisory Committee, and the Judicial Services Commission. He also held the post of secretary of the Hong Kong Bar Association. He was also a steward of the Hong Kong Jockey Club.
On the education front, he is currently Vice-Chairman of the Council of the Hong Kong University of Science and Technology and Chairman of the University and Polytechnics Grants Committee. He is a trustee of the Friends of Tsinghua University Law School Charitable Trust. He is also the Vice-Chairman of the School Council of St. Paul's Co-educational College of Hong Kong.
In 2001, he was awarded an honorary doctor of laws by the University of Hong Kong.
In August 2010, he was appointed as honorary professor of law by the University of Hong Kong, Chinese University of Hong Kong and the City University of Hong Kong. His appointments took effect on 1 September 2010 after his retirement from the post of Chief Justice.
In 2013, he was awarded an honorary Doctor of Civil Law by the University of Oxford.