Tony Hicks added 18 points for the Quakers (3-10, 1-0 Ivy League).
Pennsylvania led 43-38 at the break and started the second period with three unanswered buckets by Dougherty, Hicks and Nelson-Henry within a minute to stretch its lead to 11.
The Quakers responded with an 11-2 run to lead 71-63 with four minutes left.
Another Barrett 3 with 22 seconds on the clock tied it again before Dougherty and Miles Jackson-Cartwright combined for 3 of 4 from the line to give Penn the win.
The Quakers outrebounded Princeton 42-25.
Should the Lakers take Ben Simmons or Brandon Ingram if they get the No. 1 pick? And how does the rest of the top 10 shake out? Our Insiders run their latest mock draft, with L.A. on the clock.
Shaka Smart lost five seniors and his best player. But behind a trio of talented underclassmen, the Longhorns could be building something special.
High school junior Zach Brown, a 7-footer from Miami, has rescinded his commitment to UConn, sources told ESPN.