knox was the son of william shadrach knox sr and rebecca walker, and the grandson of samuel knox and mary kimbell and jimmy walker and hannah richardson. born in killingly, connecticut, he moved with his parents to lawrence, massachusetts, in 1852; he attended the public schools and amherst college where he studied the law. he was admitted to the bar in 1866 and commenced practice in lawrence. in 1874 he became a member of the state house of representatives in 1874 and 1875, and he was city solicitor of lawrence in 1875, 1876, and 1887-1890. knox was elected as a republican to the fifty-fourth and to the three succeeding congresses (march 4, 1895 – march 3, 1903). there he served as chairman, in the committee on territories (fifty-fifth through fifty-seventh congresses). he was not a candidate for renomination.