He studied law, was admitted to the bar, and was commissioned as a major in the Army by President John Adams.
James Cochran was elected as a Federalist to the Fifth Congress, March 4, 1797 to March 3, 1799.