Murray Energy Corp., led by outspoken Trump administration ally Robert Murray, has filed for chapter 11 protection, a stark example of coal’s diminished role in the U.S. energy sector.

The eighth coal producer to collapse into bankruptcy over the past year, Murray Energy is the latest to fall victim to diminished demand for coal and competition from cheaper fuels.

As...