Born in Shawneetown, Illinois, Wilshire was educated in the country schools. Spent three years in California in gold mining, from 1852 to 1855, when he returned to his home in Port Byron and engaged in the coal mining and mercantile business. He studied law, and was admitted to the bar in 1859. He entered the Union Army as major in the One Hundred and Twenty-sixth Regiment, Illinois Volunteer Infantry, and served from July 16, 1862, to July 16, 1864, when he resigned his commission on account of ill health. After the war located in Little Rock, Arkansas, and commenced the practice of law. He was appointed solicitor general of the State in 1867. Chief justice of the State supreme court from 1868 to 1871, when he resigned and resumed the practice of law. Presented credentials as a Republican Member-elect to the Forty-third Congress and served from March 4, 1873, to June 16, 1874, when he was succeeded by Thomas M. Gunter, who contested his election.
Wilshire was elected as a Democrat to the Forty-fourth Congress (March 4, 1875-March 3, 1877). He was not a candidate for renomination in 1876. He engaged in the practice of law in Washington, D.C., where he died August 19, 1888. He was interred in Mount Holly Cemetery, Little Rock, Arkansas.