Citigroup Inc. said second-quarter profit plunged 96% as the bank took a charge tied to settlement announced earlier Monday with the Justice Department to settle allegations it sold shoddy mortgages before the financial crisis.

But shares jumped 3% to $48.42 as Citigroup's results solidly beat the estimates of analysts polled by Thomson Reuters, excluding the settlement charge. Trading revenue held up better than expected, and...