Brice Johnson added 16 points for the Tar Heels (6-1), who shot 53 percent and repeatedly capitalized on Terrapins miscues to hang on in a tough matchup.
Trimble finished with 23 points and 12 assists to lead Maryland (6-1), which shot 51 percent but committed 22 turnovers that UNC converted into 21 points.
This was the headlining matchup for the interconference series, pitting two Atlantic Coast Conference charter members with Final Four aspirations. Paige and Trimble basically took this one over for much of the second half, putting on a show of high-level guard play to make this matchup worthy of the rankings.
Eventually, Paige and the Tar Heels -- the preseason No. 1 in The Associated Press Top 25 before sliding with a loss at Northern Iowa -- put together enough stops and key baskets to slowly stretch out the lead and wrestle away control in the final 7 1/2 minutes.
Maryland missed eight of its last 10 shots as North Carolina slowly pushed a 74-72 lead back to double figures after blowing a 13-point first-half lead.
Paige finished with a 7-for-12 shooting performance and made 4 of 5 3-point tries to go with five assists and one turnover in 34 minutes, showing no ill effects from the broken bone in his right hand -- an injury sustained in practice Nov. 3 -- nor rust from missing the first six games.
He also came up with a big defensive play, drawing a charge on Trimble in transition after a turnover with 3:03 left and UNC protecting an 85-76 lead.
Maryland: Duke transfer Rasheed Sulaimon, booed every time he touched the ball, scored 18 points with five 3-pointers. ... Longtime former coach and Hall of Famer Gary Williams was in the stands and was introduced at halftime over the public-address system.
UNC: Joel Berry II finished with 14 points and five assists, making three 3s. ... The Tar Heels made 9 of 13 3-pointers. ... Rapper J.Cole, an instate native of Fayetteville, sat courtside.