 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.