On 4 September 2016, at the age of 23, Law was elected to serve as a legislator for Hong Kong Island, making him the youngest lawmaker in the history of the Legislative Council of Hong Kong. Over his controversial oath-taking at the Legislative Council inaugural meeting, his office was challenged by the Hong Kong Government which resulted in his disqualification from the Legislative Council on 14 July 2017.