Born in Philadelphia, he served in World War I as an observation balloon pilot with the United States Army Air Service, and as an adjutant in the One Hundred and Eleventh Infantry. He graduated from Temple University Law School in 1928.
In November 1943, he was appointed assistant to the Attorney General of the United States and was responsible for supervising the Federal Bureau of Investigation, Immigration and Naturalization Service, Bureau of Prisons and various divisions.
He then served as a judge of the United States District Court for the Eastern District of Pennsylvania.
In 1952, President Harry Truman appointed McGranery Attorney General and he served in that capacity until 1953. McGranery revoked the re-entry permit of Charlie Chaplin when he was accused of Communist sympathies. He returned to practicing law in Washington, D.C. in 1954.