UNCG (11-21) led by 11 points early in the second half and never trailed in the period. Samford (13-19) closed the margin to within two points three different times, the latest at 78-76 on Christen Cunningham's jumper with 24 seconds left.
Baldwin made two free throws to push the lead back to four with 21.5 seconds left and Kayel Locke added another free throw to cap the scoring. Locke finished with 11 points and 10 rebounds, and Baldwin had seven rebounds and five assists.
The Spartans advance to face top-seeded Wofford in the quarterfinals on Saturday.
Darius Jones-Gibson led the Bulldogs with 19.