In 1866, the people of Shirley Township sent Hagaman to Governor of Kansas Samuel J. Crawford with the petition requesting the right to organize as a county.
Hagaman was elected county clerk and promptly became a candidate to be the first to represent Shirley County in the Kansas House of Representatives, losing to John B. Rupe.