The longest and heaviest freight train ran on February 20, 1986 from Ekibastuz to the Urals, Soviet Union hauling coal.
The picture of the train posted is hauling coal. Which makes it the longest "train". Not the longest ride or continuous route.
Since the picture is not of a mountainous region, the Urals,
You on the shores of the Caspian Sea, in Kazakhstan.
The origin of the train hauling the coal.