By Liz Hoffman

Morgan Stanley's second-quarter earnings rose 45% during a three-month stretch when the coronavirus ripped through the U.S. economy and financial markets.

The bank reported revenue of $13.4 billion and profit of $3.2 billion, or $1.96 per share, on Thursday. Both were quarterly records for the firm and well above the expectations of Wall Street analysts, who had predicted profit of $1.77 billion, or $1.12 per share.

Morgan Stanley and Bank of America Corp. were the last of the big U.S. banks to report financial results for a period that posed the biggest test of the financial system since 2008. Results shook out along recognizable lines: Big commercial and consumer lenders like JPMorgan Chase & Co. and Bank of America took provisions for loan losses that dragged down earnings, while a surge in securities trading and underwriting favored Wall Street-heavier firms like Morgan Stanley and Goldman Sachs Group Inc.

Morgan Stanley also has the country's largest wealth-management brokerage, which brought in $4.7 billion in revenue during the second quarter. Chief Executive James Gorman calls the unit, which clips fees managing $2.6 trillion of clients' money, a ballast that steadies the firm while its Wall Street businesses of deals and trades provide the power.

That engine purred in the second quarter. Morgan Stanley's trading revenue rose 68% from the same period a year ago, more than doubling in debt trading. Its investment bankers generated $1.6 billion in revenue helping companies sell stock and debt to the public, two-thirds higher than a year ago.

Mr. Gorman, who himself contracted Covid-19 earlier this year, said in a statement, "The second quarter tested the model and we performed exceedingly well."

Write to Liz Hoffman at liz.hoffman@wsj.com