Attorney General Jeff Sessions defended his role in the firing of James Comey as FBI director, making some of his fullest remarks on the issue to date on Wednesday in a Senate hearing dominated by questions related to Russia but also touching on immigration, civil rights and other issues.

Speaking before the Senate Judiciary Committee for five hours, Mr. Sessions cited Mr. Comey’s 2016 public comments that he was not recommending charges related to Democratic presidential nominee Hillary Clinton’s email use, describing the...