Attorney General Jeff Sessions resigned at the request of President Trump on Wednesday, immediately placing oversight of the special counsel’s Russia probe in the hands of an official who has been critical of the inquiry and suggested limiting it.

The move—one day after elections in which Republicans lost control of the House of Representatives but made gains in the Senate—follows months in which Mr. Trump regularly expressed displeasure with Mr. Sessions for recusing himself from the inquiry into alleged Russian interference in the 2016 election. Mr. Trump has described the nation’s top law enforcement officer as “DISGRACEFUL!”

Mr. Sessions made it clear in his resignation letter that Mr. Trump had asked him to step down, saying he was submitting his resignation “at your request.” The undated letter was written Wednesday, a Justice Department spokeswoman said.

In a tweet announcing Mr. Sessions’ departure, Mr. Trump said Matthew Whitaker, Mr. Sessions’ top aide, would become acting attorney general. “We thank Attorney General Jeff Sessions for his service, and wish him well!” Mr. Trump said.

White House Chief of Staff John Kelly, not Mr. Trump, called Mr. Sessions and sought the resignation letter, an administration official said.