McNamara made nine three-pointers and his offensive performance was a must for the fifth-seeded Orangemen, who trailed for much of the game.
"Gerry was in another world today and I don't think we will see the likes of that in forever," Syracuse Coach Jim Boeheim said.
"If he (McNamara) didn't shoot that well, we probably would have been up by 20 in the first half," Cougars Coach Steve Cleveland said.
BYU (22-8) still had a chance to win and took a 73-72 lead on Rafael Araujo's follow slam with 3:24 left. Warrick answered with a layup to give Syracuse the lead for good before McNamara made his ninth three-pointer with 2:14 left.
The Cougars missed an opportunity to regain the lead with 20 seconds to go when Mike Bigelow failed on a three-point try.
Syracuse will face Maryland in the second round.
Members of Congress to keep receiving porn magazine
Iranian woman stops the execution of son's killer