LONDON— Anglo American PLC on Tuesday said it would leave the coal business and exit a sizeable chunk of its iron-ore activities, as part of an aggressive restructuring that would turn the battered mining giant’s focus on higher-margin commodities like diamonds, platinum and copper.

The London-based company unveiled details of the restructuring after posting a $5.6 billion loss for 2015—its largest in recent memory—as a global rout in commodity prices punished the costly mines it operates around the world.

The plunge in commodities, sparked by diminished appetite from China and a seemingly unstoppable gusher of production, has ravaged mining companies—and their investors—in the past year. In response, miners are scrambling to salvage balance sheets bloated with debt that piled up during better days.

Swiss miner and trader Glencore PLC has embarked on a more than $10 billion debt-reduction plan that included a suspension of its dividend and a $2.5 billion share offering. Rio Tinto PLC last week said it swung to an annual loss last year and cut its dividend, effectively conceding it misread demand in China. BHP Billiton Ltd. is widely expected to cut its dividend when it reports earnings next week.

Anglo American is making the most drastic moves. The commodity downturn is pushing the storied 99-year-old mining company, which was founded in South Africa by Ernest Oppenheimer, to make radical changes in its business, including the sale of dozens of once-prized assets.