McGilvary was born 16 May 1828, in North Carolina, United States and, after a largely informal education, taught school until he entered Princeton Theological Seminary in 1853. He graduated from Princeton in 1856 and returned to NC to pastor two rural churches. He was ordained in 1857. In 1858 he arrived in Thailand as a member of the Bangkok Station, Siam Mission, Presbyterian Church in the United States of America, and married Sophia Royce Bradley in 1860. In 1861, the McGilvarys participated in the opening of the Phet Buri Station, the first Protestant missionary station outside of Bangkok. In 1867, the McGilvary family moved to Chiang Mai, the chief city of Thailand's northern dependencies, and founded a new Presbyterian mission, the Laos Mission. The McGilvarys worked alone for one year and were chiefly responsible for the conversion of six men by early 1869. Persecution of these Christiansin September 1869 led to the execution of two, the scattering of the others, and the threatened closure of the Laos Mission. McGilvary's perseverance, however, prevented the lapse of Protestant work inNorthern Thailand. From 1870 until roughly 1890 McGilvary was the unofficial leader of the Laos Mission and took the leading hand in expanding its work including establishing several rural Christian communities which became important Christian centers. In 1878 he played a leading role in obtaining the so-called "Proclamation of Religious Toleration" from the Thai central government, which gave certain civil rights to northern Thai converts. McGilvary took a number of exploratory tours, beginning in the 1870s, going as far as the Shan States in Burma and Yunnan Province in Southern China in the 1890s. Those tours inspired the Laos Mission with the vision of a greater mission to the Tai peoples of China and French Indochina, a vision which dominated mission work until the 1920s. McGilvary supported theological training for northern Thai evangelists and pastors. He took a leading role in promoting central Thai literacy among the northern Thai and he played an important role in promoting mission school education, particularly female education. In 1878, McGilvary established Dara Academy in Chiangmai Province, the Oldest school in Northern of Siam. In 1888 McGilvary established a school in Chiang Saen District, Chiang Rai Province, that was moved to Chiang Rai city and eventually became Chiang Rai Witthayakhom School. McGilvary is also credited with introducing Western medicine into Northern Siam. He continued active evangelistic work, including visiting established Christian groups, up until his death on 22 August 1911, in Chiang Mai.