The 19-year-old spent the second half of last season on loan with MK Dons, scoring six times in 21 League One appearances, and made his debut for the Foxes first team last December during the Champions League game with Porto.
"I'm delighted to get it done and I can't wait to start," Barnes told the Barnsley website. "I got some really good experience out on loan last season and certainly learnt a few different things so this is now a perfect next step to come into the Championship and test myself.
"I feel I have began well in my step-up from youth football and I need to keep working hard now to progress further."
Tykes manager Paul Heckingbottom added: "Harvey is a really talented young player and we are excited to see him come to Oakwell. I am really thankful to Craig Shakespeare and his team at Leicester for allowing him to join us on loan.
"Once Harvey knew we were interested and we had a chat, he knew he wanted to come here to further develop himself following a really impressive run of games over the last year and I want to see him now continue that with us."
Barnes, who will wear the number 15 shirt, goes straight into contention for tomorrow afternoon's Championship encounter with Ipswich Town at Oakwell.