The 12-string Yamaha acoustic guitar fetched almost double its pre-sale estimate of £5,000 to £10,000, with the proceeds split evenly between charities Mind and the Arthur Rank Hospice.
It was bought by an online bidder based in France during the sale at Cheffins in Cambridge on Thursday.
Barrett left Pink Floyd in 1968, as they were about to achieve worldwide recognition, and lived in the basement of his mother’s house in Hills Road in Cambridge.
The singer died of pancreatic cancer in 2006 at the age of 60.
He mentioned the guitar in a 1971 interview with Rolling Stone magazine.
“It’s my new 12-string guitar,” said the musician, born Roger Keith Barrett.
“I’m just getting used to it.
“I polished it yesterday.”
Barrett recorded two solo albums.
His mental deterioration was blamed on drugs and he became a recluse.
The guitar was sold by his nephew, Mark Barrett, 57, together with a copy of the Rolling Stone magazine.
Mark Barrett said the guitar was stored with his father, Alan Barrett – Syd’s brother – after the Hills Road house was sold in 1974.
He said his uncle, who he “never got to know”, never collected it.
He said his father gave the instrument to him in November 2020 shortly before he died, and he decided to sell it at auction for charity.
“We were thrilled with the result of the guitar and are pleased that it will be going to someone who will appreciate it,” said Mark Barrett.
“It’s been in our family loft for years so I hope that it will give someone else as much joy as it did my uncle.”
The guitar has a serial number of 1090448 with a date code for October 21 1969.
A garden table made by Syd Barrett sold to the same bidder for £2,365.50, and a pair of wall-mounted spotlights from the basement studio where Barrett would write and play as a young man sold for £258.80 to a UK bidder in the room.
An original Cambridgeshire High School for Boys photograph from 1959, featuring Roger Barrett, Roger Waters and Storm Thorgerson, together with a Cantabrigian programme for She Stoops To Conquer from 1961 featuring Barrett as Tom Twist, sold for £744.38.
Martin Millard, a director at Cheffins, said: “We had a number of Pink Floyd superfans present at the sale and with successful bidders from across the globe, the legend of Syd clearly lives on.
“The guitar saw a huge amount of pre-sale interest on an international scale and goes to show that his cult-like status as one of the greatest icons in the world of music still holds true.
“Despite Syd’s Pink Floyd years being marred by drug addiction and struggles with mental health, he was one of the UK’s greatest musical talents and one of Cambridge’s greatest exports and we were honoured to have had the opportunity to offer these important items for sale.”
A painting, believed to be the last artwork created by Syd Barrett, was originally listed for sale but was withdrawn ahead of the auction.Internet Explorer Channel Network