John Hugh was educated in the local public schools in Marion County before attending Willamette University.
He served as the federal judge for the United States District Court for the District of Oregon in Portland. A native of Oregon, he also served as a district attorney and as an assistant district attorney in Salem, Oregon. The McNary family farm was north of Salem, where John's parents would raise ten children.
John's father Hugh was a former brickyard operator and school teacher.
His mother died in 1878, followed by his father’s death in 1883. John received his college education at the University of Oregon in Eugene.
In 1890, he was elected as the recorder for Marion County. After college he read law under the guidance of George H. Burnett, and passed the state bar in June 1894 and federal bar on July 17, 1901.
A Republican, he also served as president of the county"s bar association.
John was in private practice from 1898 until 1913. During this time, he served as deputy district attorney for Marion County between 1898 and 1904, and in 1905 became the district attorney for Oregon’s third judicial district. While in office he helped to prosecute some of those involved in the Oregon land fraud scandal.
On February 26, 1927, United States President Calvin Coolidge nominated John to serve on the United States District Court for the District of Oregon in Portland.
Confirmed by the United States Senate on February 28, he replaced Charles East. Wolverton who had died the previous year. McNary served on the federal court from February 28 until his death in Portland on October 25, 1936.
He was buried at the Salem Pioneer Cemetery, with his funeral attended by others in the legal community including East. M. Page, James Alger Fee, James U. Campbell, John O. Bailey, Harry H. Belt, John L. Rand, George Rossman, Percy R. Kelly, and Henry J. Bean.