From 2003 to 2023, Hoyer was the second-ranking Democrat in the House of Representatives behind Nancy Pelosi. He is a two-time House majority leader, having served in the post from 2007 to 2011 under Speaker Pelosi. During two periods of Republican House control (2003–2007 and 2011–2019), Hoyer served as House minority whip, both times under Minority Leader Pelosi. Following the 2018 midterm elections in which the Democrats took control of the House, Hoyer was reelected majority leader in 2019 for the 116th Congress; he remained the number two House Democrat behind Speaker Pelosi. He announced on November 17, 2022, that he, along with Pelosi, would not seek a leadership position in the 118th Congress, though he would remain a member of the House.
