Danny Welbeck opened the scoring for United while Michael Owen handed them a two-goal win.
Fergie told Sky Sports: “Well it was a cup tie and Barnsley have worked very hard. They put a lot of effort into the game and they had one or two chances after we went down to ten men.
“I think at the end of the day we’ve just about got through and probably deserved to get through.”
He continued: “When you’re playing away from home in a cup tie it’s a different experience than playing in Old Trafford.
“Last year when we won the cup we got a lot of home draws until the semi-finals when we had an away game with Derby County of course.”