Ulysses Mercur was born in Towanda, Pennsylvania. He graduated from Jefferson College in Canonsburg, Pennsylvania, in 1842. He studied law, was admitted to the bar and commenced practice in Towanda in 1843. He was a delegate to the 1856 Republican National Convention. He was president judge of the thirteenth judicial district of Pennsylvania from 1861 until March 4, 1865, when he resigned to enter Congress.