The three men and three women were removed from the Ravenstruther terminal, near Lanark, by British Transport Police.
The protesters from Coal Action blocked the main gate and attached themselves to a coal conveyor belt on the site.
They said they were highlighting the pollution caused by burning fossil fuels such as coal.
The demonstration began at 0600 GMT on Monday.
The campaigners, from Edinburgh, Glasgow and the local area, said they had prevented the delivery of thousands of tonnes of coal to power stations across Scotland.
One of the protesters, Beth Whelan, said: "Local authorities, the Scottish Government and companies such as Scottish Coal and Scottish Power are ignoring the scientific evidence on climate change.
"We have to take responsibility for our climate and our future, and stop the coal industry and its expansion. This is what we doing today - acting responsibly."
A spokesman for British Transport Police said the last arrests had been made about 1445 GMT.
He said there had been no disruption to rail services in the area.
Scottish Coal, who operate the Ravenstruther depot, said no coal trains had run in or out of the terminal on Monday for health and safety reasons.
A spokesman said: "We would like to assure all our customers that there was no disruption to coal supplies.
"Latest figures show that coal is providing over 40% of the UK's energy needs.
"Without this valuable resource, almost half of all homes and businesses in Britain would be without power."