The 30-year-old is into his seventh season at Turf Moor and has made a club-record 146 Premier League appearances for the Clarets.
Former Brighton and Hove Albion striker Barnes had just over 18 months to run on his existing deal but has now agreed fresh terms.
Burnley confirmed the news on its official website and Barnes said: "I'd like to see out my playing days here.
"At this moment in time I don't see anything else for me and I just want to continue playing at the highest level possible, and hopefully that is with Burnley."
Barnes scored 12 goals in the Premier League last season and has four in 10 appearances this campaign.