The 20-year-old is likely to be out for several months after he was stretchered off in the closing stages of Saturday's pre-season friendly draw at Pride Park.
A Derby spokesman said: "We are not prepared to put a time frame on how long Giles will be out at this stage until after the operation."
Barnes, who has one year remaining on his contract with the Rams, spent almost 10 months out with a serious knee injury last year. He returned towards the end of December and then joined Fulham on loan but did not make a first-team appearance for the Premier League club.
The move was with a view to a permanent deal but the Londoners did not follow up their initial interest.