"B team" striker Manaj, an Albania international, fired home the opener on the hour mark after Alex Quintanilla had been shown a red card for a late challenge on Riqui Puig before the break.
Alex Collado added Barca's second with five minutes to go, with Manaj then scoring his second with his chest from close range before completing his treble from the penalty spot.
Barca coach Ronald Koeman is still without a large part of his first-team squad due to the players' involvement in Euro 2020, the Copa America and the Olympic Games this summer.
However, he was still able to field a strong side, with United States international Sergino Dest, Gerard Pique and Miralem Pjanic all starting the game at the Johan Cruyff Stadium in front of a crowd of just over 2,000.
Youngster Yusuf Demir, a summer signing from Rapid Vienna, made a bright start as he looked to impress on his Barca debut. He drew an early save from Manu Garcia, who was the third division side's busiest player in the first period.
Garcia also saved twice from Sergi Roberto, the first a product of a fine Puig pass, before denying Pjanic, Demir again and Peque Polo.
Nastic were reduced to 10 men in the 40th minute when Quintanilla took out Riqui Puig, which teed up a Barca onslaught, even with Koeman making 11 changes at half-time.
Former Inter forward Manaj turned well and drove the ball into the roof of the net in the 60th minute. He almost added a second soon after, but his header was saved by substitute goalkeeper Gonzi.
Collado eventually scored Barca's second with a deflected effort with five minutes to play, before Manaj scored two more to grab his hat-trick late on.
Barca will hope to have new signing Memphis Depay in action on Saturday when they host Girona. The Dutchman arrived in the city this week and is now training with his new teammates.
However, the wait goes on for Lionel Messi, who has not yet signed his new deal with the club, although sources have told ESPN there is an agreement for him to sign a five-year contract.
Messi is currently holidaying in Miami following Copa America success with Argentina and, pending the new deal being signed, isn't due back in Barcelona until the beginning of August.