A train hauling coal derailed west of Miles City in Custer County. The derailment involved between 25 and 27 cars.