In 1846, Cook was elected by the legislature to the position of State's attorney for the ninth judicial district for two years.
He served as member of the peace convention of 1861 held in Washington, D.C., in an effort to devise means to prevent the impending war.
Cook was elected as a Republican to the Thirty-ninth and to the three succeeding Congresses and served from March 4, 1865, to August 26, 1871, when he resigned.
He resumed the practice of his profession in Evanston, Illinois, and died there August 18, 1894.
This article incorporates public domain material from the Biographical Directory of the United States Congress