The Grillo site at Burry Port, Carmarthenshire, had been branded an eyesore.
Initial housing plans were rejected in 2011 due to flooding concerns, but a new proposal was approved in 2016.
Carmarthenshire council bosses were told by officers they would have to get things moving by purchasing the site.
The action follows a decision last December to grant a long-term lease to The Marine Group for the development of the town’s harbour into a facility for boat owners and tourists.
Burry Port harbour had been established by an act of Parliament in 1825 and the town was home to copper, lead, silver and zinc processing for decades.
A power station opened there in 1954 before being demolished in 1990, prior to the opening of the Grillo zinc oxide factory.
The factory closed in 2006 and has been demolished, but mounds of earth and bricks remained.
The decision by the Plaid Cymru-led administration to buy the site was taken in private at an executive board meeting earlier in December.
The minutes reveal council leaders were told the privately-owned site next to council-owned land was unlikely to be brought forward for development unless the local authority intervened.
Council leader Emlyn Dole said it was a prime site and “front and centre” to the whole concept of developing the harbour.
“There was a need to defend that,” he told the Local Democracy Reporting Service.
Councillor John James, who represents Burry Port, said he welcomed the decision.
“It’s good to see things are moving,” he said.