No such song as "Follow the Drinking Gourd" (at least under that title) could I find in the 1876 Slave Songs of the United States. In the bibliography of the site posted by Lesley N. above, there is this entry:
Botkin, B.A. 1944. A Treasury of Southern Folklore. Crown Publishers, NY. "Follow the Drinking Gourd" was first documented by a folklorist, H.B. Parks, in Texas. His account of discovering the song and the story behind it are difficult to obtain ("Follow the Drinking Gourd." 1928. Publications of the Texas Folklore Society, Frank Dobie, ed). Botkin's account of the song is essentially a reprint of Park's publication.
Botkin quotes verbatim from Park's article except the music, which is from People's Songs, vol.1, No.2, p.12 (1947), as sung by Lee Hayes. Another reprint of the Parks article is in Mother Wit from the Laughing Barrel: Readings in the Interpretation of Afro-American Folklore, edited by Alan Dundes (University Press of Mississippi, 1990, pp. 465-468), with the original music and lyrics.
Parks records the story by "an old Negro" he met at College Station, Texas (date not given) as follows:
He [i.e., the old Negro] said that just before the Civil War, somewhere in the South, he was not just sure where, there came a sailor who had lost one leg and had the missing member replaced by a peg-leg. He would appear very suddenly at some plantation and ask for work as a painter or carpenter. This he was able to get at almost every place. He made friends with the slaves and soon all of the young colored men were singing the song that is herein mentioned. The following spring nearly all the young men among the slaves disappeared and made their way to the north and finally to Canada by following a trail that had been made by the peg-leg sailor and was held in memory by the Negroes in this peculiar song....
One of my [i.e., Park's] great-uncles, who was connected with the railroad movement, remembered that in the records of the Anti-Slavery Society there was a story of a peg-legged sailor, known as Peg-Leg Joe, who made a number of trips through the South and induced young Negroes to run away and escape through the North to Canada....
Parks had heard this song sung by "a little Negro boy" in Hot Springs, North Carolina in 1912; by "a Negro fisherman" in Lousville in 1913; and by "two Negro boys" at Waller, Texas in 1918.
The story behind the song seems to have mainly come from the anonymous "old Negro."