Hayward was listed as an unranked three-star prospect on the recruiting website Rivals.com. He accepted a scholarship offer from Butler University, coached by Brad Stevens, despite late interest from Purdue and Michigan.
As a freshman in 2008–09, Hayward averaged 13.1 points and 6.5 rebounds per game. He was named Horizon League Newcomer of the Year, and selected to the Horizon League All-Newcomer Team and the All-Horizon League First Team. The Butler Bulldogs won the Horizon League regular-season title. In the championship game of the 2009 Horizon League Men’s Basketball Tournament, Butler lost to Cleveland State. Butler received an at-large bid to the 2009 NCAA Division I Men’s Basketball Tournament and lost in the First Round against the LSU Tigers.
In 2009–10, Hayward was nominated for various preseason All-America teams and Player of the Year awards. Hayward averaged 15.5 points and 8.2 rebounds per game as a sophomore. The Butler Bulldogs won both the Horizon League regular-season title and the 2010 Horizon League Men’s Basketball Tournament. He was named the Horizon League Player of the Year and selected to the All-Horizon League First Team. Hayward was also selected AP All-American Honorable Mention and ESPN Third-team Academic All-American.
Butler lost to Duke in the championship game of the 2010 NCAA Division I Men’s Basketball Tournament. In the final seconds, Hayward attempted a game-winning, buzzer-beating, half-court shot, which hit the backboard and rim, and bounced away. The shot is considered one of the most well-known plays in NCAA tournament history. Hayward was selected to the All-Tournament Team.