J. Harold Flannery was born in Pittston, Pennsylvania. He graduated from the Wyoming Seminary in Kingston, Pennsylvania, in 1917 and from the Dickinson School of Law in Carlisle, Pennsylvania, in 1920. During the First World War, Flannery served as a private in the United States Army and was honorably discharged in 1918 He was the solicitor for Pittston City from 1926 to 1930, and served as assistant district attorney of Luzerne County, Pennsylvania, from 1932 to 1936.
Flannery was elected as a Democrat to the Seventy-fifth, Seventy-sixth, and Seventy-seventh Congresses. He served from January 3, 1937, until his resignation on January 3, 1942, to become judge of the common pleas court of Luzerne County. He was reelected in 1951 for a ten-year term and served until his death in Bethesda, Maryland. He was a delegate to the Democratic National Conventions in 1944 and in 1960.