During the Second Opium War, Lay served as Lord Elgin's interpreter and he participated in the negotiation of the Sino-British Treaty of Tianjin. Even though Lay was not in charge of designing the actual treaty, he was instrumental in intimidating the Qing delegation into signing it despite the highly unfavorable terms to the Chinese side. Among other things, Lay humiliated the Qing representative Qiying by exposing recently captured documents, which revealed Qiying's hostility to the British. The disgraced Qiying later committed suicide.