He was elected in 1841 to the Alabama House of Representatives, in which he served for one year. In March 1842, Yancey sold his newspaper because of increasing debt. Throughout his career as an editor, he had faced the problem of many fellow editors in obtaining and collecting on subscriptions and decided to open a law practice instead. In 1843, he ran for the Alabama Senate and was elected by a vote of 1,115 to 1,025. His special concern in this election was the effort being made by Whigs to determine apportionment in the state legislature based on the "federal ratio" of each slave counting as three-fifths of a person. At the time, only whites were counted and the change would have benefited the Whigs, who generally were the largest slaveholders. This type of conflict between large slaveholders and yeomen Alabamians would continue through the Alabama secession convention in 1861.