President George W. Bush appointed Roberts as an appellate judge of the D.C. Circuit in 2003. During his two-year tenure on the D.C. Circuit, Roberts authored 49 opinions, eliciting two dissents from other judges, and authoring three dissents of his own. In 2005, Bush nominated Roberts to the Supreme Court, initially to be an associate justice to fill the vacancy left by the retirement of Justice Sandra Day O'Connor. Chief Justice William Rehnquist died shortly afterward, however, before Roberts's Senate confirmation hearings had begun. Bush then withdrew Roberts's nomination and instead nominated him to become Chief Justice, choosing Samuel Alito to replace O'Connor.
Roberts has authored majority opinions in many important cases, including decisions relating to elections, federal agencies, presidential power, the Affordable Care Act, and race-based college admissions.