Lam graduated from the Chinese University of Hong Kongin 1999, studying Government and Public Administration. After graduation, he joined the Democratic Party and became assistant of Albert Ho. He was transferred to Democratic Party's Legislative Council Secretariatin 2001 and became assistant of party's chairman in 2003, having been serving Yeung Sum, Lee Wing-tat and Albert Ho. In 2006 when the Democratic Party set up a five-member investigation commission on the allegation of some senior members involving in spying activities of Beijing, he became the secretary of the commission. He left the party and joined the Independent Commission Against Corruption as an investigator in 2006. He returned to the Democratic Party as chief executive in 2011, succeeding Chan Ka-wai who quit after being caught visiting a one-woman brothel. Lam is a spokesman of the Property Owners' Anti Bid-Rigging Alliance against an alleged bid-rigging scandal in Garden Vista, where he is a resident, as well as the alleged scandals in other flats. He was also involved in parallel trading issue, which was criticised for affecting the daily livelihood of local residents especially in North District, as a coordinator of the Sheung Shui Parallel-Goods Monitoring Group. In 2015, he won a seat in Shek Wu Hui of the NorthDistrict Council in the 2015 District Council elections, defeating incumbent Simon Wong Yuen-keung. In 2016, he represented the Democratic Party to run inNew Territories East for the 2016 Legislative Council election, succeeding chairwomanEmily Lau.
Lam was a victim of the Yuen Long attacks on 21 July 2019, when MTR passengers, journalists, and pro-democratic protesters were attacked by a mob of white-clad men. As a result, his mouth was wounded and he was treated with several stitches. Lam was streaming the violence on Facebook with his phone. A rally was held in Yuen Long alleging that Lam was responsible for the Yuen Long attack and accusing him of bringing protesters to Yuen Long. In response, Lam pointed out that video footage shows the men attacking people in Yuen Long long before he arrived in the town, and replied that "telling a lie a hundred times will not make it the truth".