Jarryn Skeete and Willie Conner scored 12 apiece for the Bulls (11-9, 4-3 Mid-American Conference), who outscored the Cardinals 40-26 in the paint and scored 24 points on 19 Ball State turnovers.
Leading by two at halftime, Buffalo pulled ahead on an 8-4 run and led 39-33 on Hamilton's 3-pointer.
Skeete hit a 3 amid a 7-3 run and the Bulls led by 12, 52-40, with 10:46 left, but Ball State gained on a 10-2 run and pulled within 61-58 on Jeremiah Davis' 3-pointer with 5:49 left.
Buffalo pulled away on a 10-1 run and the Cardinals got no closer than nine the rest of the way.
Davis scored 13, Trey Moses added 11 and Bo Calhoun scored 11 and grabbed 12 rebounds for Ball State (13-7, 4-3).