Despite a quarter in which Bank of America’s overall income declined 39%, its wealth and investment management business surged, led by BofA Merrill Lynch.

In fact, of the Charlotte, N.C., banking company’s six business units, only wealth and investing reported revenue growth from a year earlier. BofA Merrill led the way as its revenue rose 18% and client balances increased 7%.

Armed with stronger deposit growth, higher fee-based income and lower credit costs, BofA’s global wealth and investment management net income increased 22% from a year earlier. Revenue rose 11% to $4.5 billion.

The company reported that this was the strong quarter for BofA Merrill since the acquisition was completed as the unit set records for revenue, asset management fees and brokerage income. In addition, the global wealth and investment management unit more than doubled long-term asset management flows and added 184 financial advisors since the end of 2010 through a combination of new hires and high advisor retention rates.

At the end of the first quarte, the number of Financial Advisors totaled 15,695, and the total number of wealth advisors was 17,201, both up 3% from a year earlier.

Bank of America Merrill Lynch ranked No. 2 in both  global and U.S. investment banking fees for the first quarter of 2011  with a market share of 7.9% and 12.3%, respectively,  according to Dealogic. The global market share improved by 1.6  percentage points from previous quarter and was the largest  increase among the top 15 banks, according to Dealogic.

Bank of America Merrill Lynch gained market share in global and U.S. fee pools from the previous quarter and ranked in the top three globally in  leveraged loans, asset and mortgage-backed securities, investment grade corporate debt, syndicated loans, high-yield corporate debt and common stock underwriting.

The parent company suffered through a quarter in which its reported higher costs related to its mortgage business and higher litigation expenses as it also set aside more money to cover bad loans.

BofA reported Friday it earned $1.7 billion, or 17 cents per share, falling short of analysts expectations by 11 cents, and revenue fell 15.97% to $26.9 billion from a year earlier.

BofA also announced Friday that Bruce Thompson, its chief risk officer, will replace Chuck Nsoki as its chief financial officer. The company said that Noski, who was named vice chairman, couldn't move to Charlotte to handle the CFO responsibilities because of an illness of a close family member.