The win was the third in a row for the Tar Heels (8-2) since their lost to Indiana Nov. 27.
Akeem Richmond led East Carolina (6-2) with 17 points off the bench. Fellow reserve Miguel Paul scored and starter Maurice Kemp both scored 15.
North Carolina ran off to a 42-26 lead at halftime, but the Pirates outscored the Heels 61-51 in a wild second half. Richmond scored a 3-pointer with 34 seconds left in regulation to pull the Pirates to 89-85, but Dexter Strickland sank a pair of free throws to prevent any further gains.
Puzzle-maker slips 'Murdoch Is Evil' into Rupert Murdoch's Sunday Telegraph
Police: Sword-wielding man demanded free tacos