Wells Fargo & Co. Chairman and Chief Executive John Stumpf, under fire for the bank’s sales-tactics scandal and his own handling of its fallout, is stepping down from both roles, effective immediately, the bank said Wednesday.

Mr. Stumpf will be replaced as head of the third-largest U.S. bank by assets by President and Chief Operating Officer Timothy J. Sloan, who was widely seen as his heir apparent.

Mr....