The law announced by economy minister Eric Wiebes on Friday applies to plants build in the 1990s, while newer ones will have to shut by the end of 2029, and marks the first step towards the government's goal of shutting all coal-fired plants by 2030.
The first two plants are run by Germany's RWE and Sweden's Vattenfall in Geertruidenberg and Amsterdam, respectively, and have been in operation since 1994. The remaining three were built in 2015 and 2016.
RWE, which also operates one of the newer coal-fired plants, said it was displeased by the decisions, as they offer no compensation for the ban on coal and for the 3.2 billion euros (2.8 billion pounds) RWE said it invested in its newest plant at the request of the government.
"We expect significant consequences for our activities", the company said in a statement. "We will contemplate legal action if the law is implemented as currently proposed."
Vattenfall subsidiary Nuon said it would abide to the law and would shut down its coal-fired plant, known as Hemweg-8, at the end of 2024.
Shutting the coal-fired plants should help the government achieve its goal of reducing CO2 emissions by 49 percent relative to the 1990 level by 2030.
Emissions were 13 percent lower last year than in 1990.
(Reporting by Bart Meijer, editing by Louise Heavens and Alexander Smith)
By Bart H. Meijer