Born in Richmond Hill, at the Langstaff residence around today's Highway 7 and Yonge Street, an area then known as Langstaff Corners. He was the son of Jon Langstaff and Lucy Miles and grandson of Abner Mills. Langstaff first studied medicine as a "house pupil" under John Rolph in Toronto. He later travelled to study in England, at Guy's Hospital in London. He was the son of Jon Langstaff and grandson of Abner Mills. After completing his schooling, he was licensed by the Upper Canada Medical Board and he set up a medical practice in Unionville in April of 1849 but after only four months relocated it to Richmond Hill. In 1850 and 1851, Langstaff was listed as a professor at Rolph's Toronto School of Medicine. Langstaff married Mary Ann Miller in 1854. The couple had ten children, with three surviving to adulthood.
Langstaff also owned a sawmill in the area. Although his fees were the same as those suggested by the local medical association, he often did not collect them from the poor, or reduced them for various reasons, and the addition income from the sawmill was needed to support his family.
In 1878, Langstaff was elected to the Richmond Hill Village Council as a councillor. He served one year. In 1880, he was elected to the council as reeve. In 1882, the widowed Langstaff married Louisa Palmer, with whom he had four children.
Langstaff died in 1889, still an active doctor.
Langstaff Secondary School in Richmond Hill was opened in 1964 and named in his honour. Dr. James Langstaff Park in Richmond Hill is named in his honour. It is part of the Langstaff Discovery Centre whose name more generally honours his family line.