He then joined Barack Obama's presidential campaign in March 2007 as Obama's Iowa communications director. After Obama's Iowa caucus victory, Earnest worked as a top communications aide in several primary contests including South Carolina, Texas and Pennsylvania. During the 2008 general election, Earnest served as the campaign's deputy communication director. After Obama was elected president, Earnest moved to Washington, D.C. and served as the communications director for the presidential inaugural committee.