Wells Fargo was once the most valuable bank as measured by the price of its stock, which attracted the billionaire Warren E. Buffett as its largest shareholder. Mr. Buffett’s company, Berkshire Hathaway, has a stake of about 10 percent. Mr. Buffett did not respond to a request for comment on Wednesday. Wells Fargo has since ceded the most valuable bank distinction to JPMorgan Chase.
The board received a letter from Mr. Stumpf early on Wednesday indicating that he intended to retire, according to a person briefed on the matter.
This person said the board was still in the early stages of conducting its investigation into the fake accounts and Mr. Stumpf’s handling of the scandal and had not drawn any conclusions from its inquiry.
The board was not scheduled to meet on Wednesday when it received Mr. Stumpf’s letter, which this person described as brief and lacking any indication as to why the longtime C.E.O. decided to leave now.
Top bank executives were expecting that Mr. Stumpf would address analysts and investors — as he has always done — when Wells Fargo reports its third-quarter results on Friday.
Wells Fargo said Mr. Stumpf would be replaced by Timothy J. Sloan, its president and chief operating officer. Just two days earlier, the San Francisco bank shuffled its top management to give more responsibility to Mr. Sloan.
“I am grateful for the opportunity to have led Wells Fargo,” Mr. Stumpf said in a written statement. “While I have been deeply committed and focused on managing the company through this period, I have decided it is best for the company that I step aside.”
Mr. Sloan was informed early Wednesday that he was the bank’s new C.E.O., though he had known for several days that Mr. Stumpf was preparing to step down.
In an interview, Mr. Sloan said Mr. Stumpf had told him of his decision to retire after concluding that he would most likely continue to be the focus of much of the criticism being leveled at the bank.
“It was an incredibly selfless decision,” Mr. Sloan said.
Federal regulators and the Los Angeles city attorney began looking into the issue in 2013. The deal Wells Fargo announced last month to settle cases brought by their offices was intended to resolve the matter, but it instead opened the floodgates, provoking a furious outpouring of questions, criticism and new information about what former employees say was a boiler-room culture of toxic sales pressure. The Department of Justice and Labor Department opened their own inquiries.
Mr. Sloan said the bank had already named a new head of community banking, ended the retail banking sales goals that employees blamed for putting them under undue pressure and extended its review of its sales practices back to 2009. Originally, the bank’s review covered its activities only between 2011 and 2015.
Mr. Sloan will not hold the dual of roles of chief executive and chairman as Mr. Stump had.
Mr. Stumpf agreed last month to surrender stock grants valued at $41 million — another highly unusual move on Wall Street, where clawback provisions have been widely adopted but are almost never deployed. Mr. Stumpf said he would give up his $2.8 million annual salary for the duration of the board’s investigation.
Because his departure is a resignation, Mr. Stumpf will leave without any severance, according to Oscar Suris, a company spokesman.
Senator Elizabeth Warren, the Massachusetts Democrat who blasted Mr. Stumpf when he appeared before the Senate last month, fired off a scathing statement on Wednesday.
“As I said at the hearing last month, Mr. Stumpf should resign, return every nickel he made while this scam was going on, and face an investigation by the Justice Department and S.E.C.,” she said. “So far, he’s one for three.”