Following a successful application to the Scotland Rural Priorities Fund, the Berwickshire facility has been granted the sum to upgrade the plant and pool facilities, including a new roof and an extension to the dry side activities.
The huge cash injection will sustain eight jobs and ensure that the facility continues to deliver health and education benefits to around 3,000 users per month.
Delighted with the outcome, Duns Pool manager Kirsty Inkpen described the successful grant application as "a huge triumph" for the people of Duns and all the other users of the pool.
"After 13 years of running the pool hand to mouth it is great to know that the maintenance and repairs, always a huge problem for us, will be taken care of, giving us a brighter future," Kirsty said. "Our enthusiastic team of staff is both loyal and committed and really deserves the security this will bring."
Built in 1972, Duns Swimming Pool is in need of refurbishment and has existed on a shoe string in comparison to other Borders facilities since 1997, when Scottish Borders Council decided it was no longer viable.
Duns Swimming Pool then became the first pool ever to go into Trust status, when a group of volunteers formed BREST (Berwickshire Recreation Education Sports Trust), who have been running the facility ever since.
Trust director Rosalyn Gresham explained: "Kirsty and I have been working towards this grant for over 18 months now as we believed it would offer the best chance of a long term future for the pool in Duns.
"This has been a challenging and frustrating application process but it just shows what can be achieved if you have a committed and determined team.
"We would like to thank all those who have supported and helped us, especially Phillipa Whetton from BAVS, Sheila Fraser from SCVO, Karen Morrison from Scottish Natural Heritage and Scottish Borders Council."
Karen Morrison, Rural Priorities case officer, said: "We are delighted that the Scotland Rural Development Programme grant of 663,417 to upgrade and extend Duns Swimming Pool will help to secure its future for the benefit of all local people.
"The swimming pool is a vital part of the Duns sporting, recreation and educational life and it is great that the community group have worked hard to make sure that current and future generations learn to swim, keep fit and enjoy the water."
The details of the upgrade have to be finalised but will be planned to minimise any inconvenience to pool customers, and although a short closure will be necessary, BREST believe that the outcome will be worth it.
Details of all the arrangements will be posted on www.dunsswimmingpool.co.uk as they are finalised.
The results of the seventh round of Rural Priorities funding were announced last week, with Duns pool just one of 13 Berwickshire operations set to benefit. 37 Borders projects had grants approved in this latest round of funding, to the tune of nearly 6million.
Further applications, including a bid for 170,000 by Greenlaw Football Club to improve facilities at their Harper Field site and create a Centre for Football in Berwickshire, have reached a further eligibility stage and are still being considered.