The 19 year old Ballybofey lad has captained the Republic at youth level and has represented the country at at the European under 17 Championships.
Temporary Barnet manager Paul Fairclough told the club`s official website: “We are delighted to have John on board.”
“He is a player that Wolves rate highly and he will be in the squad for the game on Saturday against Shrewsbury.”
Dunleavy, who plays at right back, has joined Barnet on a short term deal. Barnet currently find themselves in a relegation struggle at the foot of League 2. Dunleavy signed his first professional contract with Wolves at the end of the 2008/09 season.
He is the son of former Donegal GAA star Brendan.