In 1847, Lay was sent to China to study Chinese under the German linguist and missionary Karl Gützlaff. Lay's proficiency in the Chinese language soon earned him promotion in the British consular service and in 1854 he was appointed acting Vice-Consul in Shanghai. The same year, Lay took part in the founding of the Imperial Maritime Customs Service and he became the first Inspector General of the service the following year. In China, Lay adopted a Chinese name Li Taiguo (李泰國, Lǐ Tàiguó), which was similar to his father's (李太郭, Lǐ Tàiguō).