The Giants announced the hiring late Monday afternoon, less than 24 hours after Shurmur and the Vikings were beaten by the Philadelphia Eagles in the NFC title game.
The 52-year-old Shurmur replaces Ben McAdoo, who was fired in early December with the team mired with a 2-10 record and owners and fans upset with his handling of the benching of two-time Super Bowl MVP Eli Manning.
Defensive coordinator Steve Spagnuolo took over for the final four games and posted a 1-3 record.
''He has an outstanding track record in developing young players, and it is clear his players respond to his guidance and direction,'' co-owners John Mara and Steve Tisch said in a statement.
''We interviewed six talented and qualified candidates, and we feel like Pat, with his vision and experience, is the right person to lead our team.''
The Giants won't officially introduce Shurmur until Friday. A winter storm in the Midwest is preventing him from coming to New Jersey on Tuesday and he will be at the Senior Bowl in Mobile, Alabama, from Tuesday night through Thursday.
Shurmur returns to the head coaching ranks for the first time since leading the Cleveland Browns in 2011-12. He takes over a troubled team that posted a 3-13 record a year after making the playoffs.
Shurmur was interviewed on Jan. 6 by Mara, new general manager Dave Gettleman and assistant GM Kevin Abrams.
Following that meeting in Minneapolis, Shurmur had an hour-long phone conversation with Tisch.
The Giants interviewed five other candidates, kicking it off with Spagnuolo three days after the season ended.
New York also spoke with New England coordinators Josh McDaniels and Matt Patricia, Carolina defensive coordinator Steve Wilks and recently fired Broncos running backs coach Eric Studesville, who has since been hired as a running backs coach by the Dolphins. Wilks was hired as the head coach in Arizona on Monday
Shurmur has earned a reputation as a quarterback whisperer. NFC title game opponents Nick Foles of the Eagles and Case Keenum of the Vikings were tutored by him.
With the Giants, Shurmur will get to work with Manning and possibly the No. 2 pick in the draft, if New York uses the pick to pick an heir apparent.
But the Giants also had problems in the locker room. Three defensive backs - Janoris Jenkins, Dominique Rodgers-Cromartie and Eli Apple were suspended for a game for conduct detrimental to the team.
Vikings wide receiver Adam Thielen said Shurmur constantly put players in position to contribute and he doesn't take anything for granted.
''He's not a stubborn guy. He's going to throw stuff out if it's not working, and he's going to find things that guys are good at,'' Thielen said Monday as the Vikings cleaned out their lockers.
''So I think as a head coach, he's going to do that on both sides of the ball. Special teams, he's going to find guys who can make plays and let them do what they do. So I think he's going to have a lot of success as a head coach.''
Shurmur has been a part of teams that have qualified for the playoffs nine times and won seven division titles. He was Philadelphia's quarterbacks coach when the Eagles played in the Super Bowl against New England in the 2004 season.
Shurmur is finishing his second year with the Vikings. He began last season as the tight ends coach and for the final nine games was also the offensive coordinator, the title he retained this season.
The Vikings finished 10th in the NFL in scoring (23.9 points), 11th in total yardage (356.9), and seventh in rushing yardage (122.3) this season.
Shurmur posted a 9-23 record in his two seasons with the Browns, going there after a two-year stint as the offensive coordinator with the Rams. He spent three seasons as the Eagles offensive coordinator after being fired.
Shurmur's NFL coaching career began with a 10-year run (1999-2008) in Philadelphia. He coached in college at Stanford and Michigan State.