On March 9, 2017, Hauschka signed a three-year contract with the Buffalo Bills. Competing against rookie Austin Rehkow for a roster spot, Hauschka won the competition on August 20. His kicking style, involving low line-drive kicks (which was one of the reasons the Seahawks, who preferred someone with a higher kick trajectory, did not re-sign him), was considered one of his strengths for Buffalo, as the greater power a line-drive kick provides can counteract windy conditions.
On September 10, 2017, in the season-opening 21–12 victory over the New York Jets, Hauschka made his debut as a Bill. He converted three extra points in the win. In Week 3, Hauschka went 4-for-4 on field goals, including a 55-yarder, and converted all extra-point attempts, earning him AFC Special Teams Player of the Week. The following week, he was a perfect 3-for-3 on field goals including a tie-breaking 56-yarder in a 23–17 win over the Falcons, earning him his second straight AFC Special Teams Player of the Week.
Hauschka broke the NFL record for most consecutive field goals made from 50 yards or beyond after he made a 50-yard field goal against the Los Angeles Chargers on November 19, 2017.