Law joined the Government as an Executive Officer in September 1975. She transferred to the Administrative Service in October 1977. Between February 1991 and April 1994, she served as Deputy Secretary for the Civil Service. Between April and November 1994, she was Deputy Secretary for Planning, Environment and Lands. In November 1994, she was promoted to Senior Assistant Director and later Deputy Director, Housing Department. Law headed the Chief Executive's Office from January to July 1997; and was made Commissioner for Transport in August 1997. She was made Director of Education in November 1998, and secretary for education and manpower in 2000. The post became Permanent Secretary in 2002, because of former Chief Executive Tung Chee Hwa's ministerial reforms. During the 2019 Hong Kong anti-extradition bill protests, National Public Radio reported, "Appearing on a local radio program, Fanny Law and Ip Kwok-him, who advise the Beijing-appointed government in Hong Kong, each offered qualified apologies for the bill. 'I'm willing as I really thought at the time 99.9% of Hongkongers would not be affected by the bill,' Law said, according to The South China Morning Post."
During her term of service, Law was responsible for large-scale reforms in education, Law was often criticized by educators who thought her ideas were out of touch with realities on the ground. Some of her public speeches also provoked controversies; teaching union representatives called for her resignation on several occasions. In early January 2006, two teachers committed suicide, three other teachers' suicides in 2005 were blamed on job-related stress. Law rejected causal connections between the deaths by suicide of two teachers due to education reforms, saying: "If the prime reason is education reforms, why have there been only two teachers who have committed suicide?" Her comments caused a furore among teachers and the public. She apologised on 10 January for her "inappropriate" remarks about the suicide of the two teachers. 7,500 – 15,000 teachers held a protest on 22 January against Law and the educational reforms. Raymond H.C. Wong was appointed to replace her.
Commissioner, ICAC
Law resigned from her post at 20 June 2007 after the HKIEd probe accused her of interfering with academic freedom. However, the Court of First Instance held that Law did not violate the institute's right to academic freedom. The judicial review was allowed to take place on 13 March 2009.
In December 2008, the Tung Wah Group of Hospitals announced Law's appointment as Chief Executive. She declined the post in February 2009, after the government barred her from working in education-related work until 2011. There are fears over potential conflicts of interest: this decision was linked to the public consultation on post-service employment of civil servants following the row over Leung Chin-man's appointment to a local property developer.