Alexander was elected as a Whig to the Twenty-fifth Congress, holding office from March 4, 1837 to March 3, 1839.