In addition to his medical work, he became an adviser and interpreter for American officials and was later vice-consul in Chefoo (present-day Yantai) and Shanghai. McCartee acted in place of an American Consul until a regular consular service was set up in 1857. In this capacity in May 1861, at the request of United States Flag-Officer Stribling, he entered Nanjing, across the battle lines and helped persuade the "Heavenly King", Hong Xiuquan of the Taipings to promise "non-molestation not only to Americans and Christians, but to all Chinese in their employ." By this effort large numbers of native Christians and their friends were rescued when the Taiping army entered Ningbo.