RALEIGH, N.C.—Duke Energy Corp. has agreed to move 80 million tons of coal ash to lined landfills at six power plant sites in what state regulators are calling the biggest cleanup of its type in U.S. history.

The company said it would cost $8 billion to $9 billion to close all of its ash basins in the Carolinas, including the six power-plant sites.

The...