In July 2024, Obama expressed concerns about Biden's campaign viability after his critically maligned
debate performance against former president Trump. On July 21, Biden
withdrew his candidacy and swiftly endorsed Vice President Harris right after to run as the Democratic nominee. Obama endorsed Harris alongside his wife Michelle five days later and delivered a speech at the
2024 Democratic National Convention formally endorsing her. He joined Harris on the campaign trail in October, traveling to various swing states and emphasizing her record as a prosecutor, senator, and vice president and advocating for increased voter turnout, and his criticisms of Donald Trump and the Republican Party were widely reported by various media outlets. After Trump was declared the winner of the election on November 6, Obama and Michelle congratulated him and Vice President–elect
JD Vance while praising the Harris campaign and calling on liberal voters to continue supporting democracy and human rights.