Born in Northborough, Massachusetts, Davis attended Yale College before studying law in Worcester, Massachusetts, where he established a successful law practice. He spent 10 years (1824–34) in the United States House of Representatives as a National Republican (later Whig), where he supported protectionist tariff legislation. He won election as Governor of Massachusetts in a three-way race in 1833 that was decided by the state legislature. After two terms he was elected to the United States Senate, where he served most of one term, resigning early in 1841 after he was once again elected governor.