Blair was elected as a Unionist from Virginia to the Thirty-seventh Congress to fill the vacancy caused by the resignation of United States Representative John S. Carlile. Blair served in this capacity from December 2, 1861 to March 3, 1863. He was then elected as an Unconditional Unionist from West Virginia to the Thirty-eighth Congress (December 7, 1863 – March 3, 1865).