The Nigerian striker came on as a late substitute and provided Pompey with the cutting edge they had lacked for most of the match, firing past Luke Steele with 10 minutes remaining.
Cutting edge: Kanu's late winner gifted Pomey their first win at Fratton Park since October
Barnsley had the first chance of the game after only two minutes, Danny Haynes latching onto a long ball but blasting over the bar.
Liam Lawrence then lofted a long ball for David Nugent, who found the space to force an impressive save from Steele.
In the ninth minute, Hayden Mullins made a mazy run into Barnsley'shalf before crossing for Dave Kitson, who took the cross in his stridebut fired just wide of goal.
Debutant David Cotterill was instrumental in multiple forays intoTykes territory, consistently displaying a range of deft touches on theleft wing.
Mark Robins' side began to look more dangerous after 20 minutes,dominating the midfield and keeping Kitson and Nugent under wraps.
Kitson's frustration soon showed as he scuffed a cross horribly wideand into the fans. In the 25 minute he had arguably his best chance tofire Pompey ahead, climbing to meet Greg Halford's free-kick butnodding just over.
Ten minutes before the break, Herman Hreidarsson produced a goodblock from another Haynes shot as the Tykes continued to carve open thehome defence with probing passes.
Portsmouth's afternoon was soured even further as Lawrence was substituted before half-time, Aaron Mokoena his replacement.
In an attempt to reverse the tide, Pompey boss Cotterill switchedhis namesake winger onto the right wing. The Welshman responded bycutting inside and firing low at Steele, who did well to smother theshot.
The hosts were nearly given a boost one minute before the half-timewhistle when substitute Mokoena wasted a good chance to score. Kitsonfed the ball through to the South African who managed to scoop the ballover the bar.
Neither side could find an attacking rhythm after the restart,Kitson leaving it until the hour mark to test the goalkeeper again. Thediminutive forward tricked his way behind the Barnsley backline butSteele was on hand to save smartly.
The home fans cheered the introduction of veteran striker NwankwoKanu in the 71st minute and his presence immediately sparked Pompeyinto life. He was unlucky not to put Mullins through on goal with oneof his first touches of the ball.
After 83 minutes, the former Arsenal man proved his worth toCotterill with the winning goal. Halford floated a ball into the boxfor Kanu to rise above Steele and head into the bottom corner.
Pompey coach Ian Woan paid tribute to Kanu.
'He is a magician and has this amazing knack of getting in the right places at the right time. It gives us a great option to bring off the bench and Kanu is an inspiration to the other players.,' Woan said.
Beaten Barnsley manager Mark Robins said: 'I'm disappointed because we more than held our own for 84 minutes but then we did not defend a set-piece.'
Chelsea 1 Everton 1 AET (Everton win on penalties): Cole and Anelka bottle it in shoot-out as Blues crash outThe Matt Lawton interview - Carlo Ancelotti: Torres is not 100 per cent.Man United to resume chase for Everton starlet Rodwell with ?15m bidMessi wants Cesc at Barca! Superstar calls for Fabregas swoop this summer
Explore more:People: Luke Steele, Aaron Mokoena, David Nugent, Hayden Mullins, Liam Lawrence, Greg Halford, Danny Haynes, Dave Kitson