The 25-year-old missed the whole of last season because of a knee injury.
James could replace captain Conor Hourihane, who has been linked with a move to Aston Villa.
Boss Paul Heckingbottom told the club website: "We've brought in a player who is hugely experienced and talented, so I'm delighted that we've got the deal done."
Find all the latest football transfers on our dedicated page or visit our Premier League tracker here.
Barnsley have signed Leicester City midfielder Matty James on loan until the end of the season.