The Illinois gubernatorial election of 1838 was the sixth quadrennial election for this office. Democrat Thomas Carlin was elected by a bare majority of the voters in a close election. He defeated Cyrus Edwards the brother of former governor Ninian Edwards for the office.