Besides his clerkship, Gray honed his skill as an advocate with the elite of the highly regarded Boston bar, which included Benjamin R. Curtis after Curtis's resignation from the U.S. Supreme Court in 1857. Gray's partners included Ebenezer Rockwood Hoar, future supreme judicial court justice and attorney general under President Ulysses S. Grant. Fully devoted to the law, Gray had little time for politics. Like his partner Hoar, however, he gravitated from "Conscience" Whig to Free Soiler to Republican. His opposition to slavery is further indicated in an attack, coauthored with John Lowell, Jr., on Chief Justice Roger B. Taney's Dred Scott opinion. Typically, the critique was solidly based on legal rather than political grounds. With the outbreak of the Civil War, Gray rendered significant legal advice to Republican governor John A. Andrew, although his support for the war was tempered by constitutional scruples over Abraham Lincoln's Emancipation Proclamation.