Down 30-18 at halftime and still trailing 33-20 with 17:43 remaining, the Quakers (6-18, 3-4) scored nine unanswered points, six by Brooks.
Penn missed its first field goal of the second half, then went 16 of 20 the rest of the way while also making 15 of 19 free throws.
Tied at 48 with 4:44 left, Lewis and Miles Cartwright made back-to-back layups and Lewis hit a 3-pointer for a seven-point cushion.
The Big Green (6-16, 2-6) could get no closer than five thereafter.
Lewis, who had scored a combined 14 points over the Quakers' previous 11 games, was 5 of 6 from the field.
Gabas Maldunas, whose 19 points and 10 rebounds led the Big Green, surpassed 500 career points in two seasons.
Mike Krzyzewski says he has good reason to be excited for next season thanks to a combination of Duke's incoming freshmen and a core of experienced upperclassmen.
Georgia guard Juwan Parker has been awarded a medical redshirt, leaving him with two years of eligibility, after missing the 2015-16 season with a partially torn Achilles tendon.
Forward Trevon Bluiett has withdrawn from consideration from the NBA draft and will return to Xavier for his junior season.