Bank of America Corp. shook up its management team Wednesday, months after regulators chastised the firm’s leadership for mishandling its “stress test” submissions.

Bruce Thompson, the bank’s chief financial officer and at times considered a close ally of Chief Executive Brian Moynihan, is leaving the Charlotte, N.C., firm, according to an internal memo sent to bank employees Wednesday evening.

The...