The Bruins led 17-13 in the fourth quarter after Justin Medlock's 29-yard field goal with 7:19 remaining.
The Irish turned the ball over with just under 2 1/2 minutes to go. The Bruins didn't get a first down, but ran the clock down to 1:21 before taking a delay of game penalty and then punting.
Quinn and the Irish took over with 1:02 to go and no timeouts. After completions of 21 and 14 yards, Quinn hit Samardzija along the right side and the wide out broke past two defenders for a 45-yard touchdown.
Quinn finished 27-of-45 passing for 304 yards for Notre Dame (6-1), which has won four straight and is off to its best start since 1998, when the Irish opened the season with eight straight wins.