James H. Hopkins was born in Washington, Pennsylvania. He attended the common schools and was graduated from Washington College (now Washington and Jefferson College) in Washington in 1850. He studied law, was admitted to the bar in 1852 and practiced in Pittsburgh, Pennsylvania, for twenty years. He was also engaged in banking, manufacturing, and mining. For several years he served as vice president of the Pittsburgh chamber of commerce.
Hopkins was an unsuccessful candidate for election in 1872. He was elected as a Democrat to the Forty-fourth Congress. He was an unsuccessful candidate for reelection in 1876. He was again elected to the Forty-eighth Congress. He served as the chairman of the United States House Committee on Labor during the Forty-eighth Congress. He was an unsuccessful candidate for reelection in 1884.
After his time in Congress, he engaged in the practice of law in Washington, D.C.. He died at his summer home at North Hatley, Quebec, Canada, in 1904. Interment in Oak Hill Cemetery, Washington, D.C.