Martinez looked to have put away the Huskies with his 6-yard TD run, but Keith Price passed 52 yards to James Johnson for his fourth TD toss to make it a 13-point game with 4:27 left.
Nebraska (3-0) won the third meeting of the teams in 364 days. Nebraska won in Seattle last September but lost in a rematch at the Holiday Bowl.
The Huskies (2-1), who had their six-game winning streak ended, kept coming back even after big mistakes allowed Nebraska to quickly increase its 20-17 halftime lead to 34-17.
Washington's Chris Polk ran 22 times for 130 yards, and Nebraska's Rex Burkhead had carries for 120.
Price was 21 of 37 for 274 yards. He was intercepted twice, with his last one allowing Nebraska to go into victory formation with just over a minute to play.
Martinez completed 10 of 21 passes for 155 yards, and he ran for 83 yards on 17 carries.
Nebraska has scored at least 40 points in each of its first three games for the first time since the 1995 national championship season.
It looked as if the Huskers would take control after Washington made a couple of bad plays in the third quarter.
The Huskies gave Nebraska a short field when Desmond Trufant was penalized 15 yards for interfering with Burkhead as he tried to catch a punt, and they were charged another 5 yards for sideline interference.
Nebraska started at its 44 and ran on seven of eight plays before Burkhead bulled into the end zone from the 1.
The Huskers were set up at the Washington 1 seconds later. Bishop Sankey dropped the kickoff, and teammate Kevin Smith couldn't come up with the ball as a horde of Huskers converged. Mathew May recovered, and Burkhead punched it in for his second touchdown in 9 seconds.
Nebraska was up 44-17 after Aaron Green's 6-yard TD run with 12:18 left, but within five minutes it was a 13-point game. Polk scored on a 2-yard run, and Price hit Johnson for a 10-yard TD.
Martinez threw for two touchdown passes in the first half, marking the second time in his career he has thrown for more than one TD in a game.
Martinez connected with Kenny Bell for 50 yards on the game's first play from scrimmage before flipping a 3-yarder to fullback Tyler Legate for a touchdown. It was Nebraska's first on an opening series in nine games.
After Ameer Abdullah's 66-yard kick return set up the Huskers at the Washington 34 in the second quarter, Martinez threw a 25-yard TD pass to Green.
Washington copied from Fresno State's game plan a week ago against Nebraska and had Price roll the pocket to the outside. He and Jermaine Kearse teamed up for two touchdown passes, a 38-yarder on the Huskies' first series and a 6-yarder after Abdullah muffed a punt.
Nebraska's injury-riddled offensive line started three players who joined the program as walk-ons in center Mike Caputo and guards Spencer Long and Seung Hoon Choi. Caputo was placed on scholarship before the start of the 2009 season.
The Huskers hadn't started three walk-ons on the offensive line since 1988.
Huskies 'melt down' in loss to Nebraska
Dawgman.com Top Stories
Huskies have eye on the long gameComing into this weekend’s game versus Oregon State, Ralph Kinne and Gavin McDaniel hadn’t gotten much love. The two stalwart walk-on running backs hadn’t taken one carry combined…
Post Game Video - Dante PettisHear what UW wide receiver Dante Pettis had to say following Washington's win over Oregon State...
Post Game Video - Myles GaskinHear what Husky tailback Myles Gaskin had to say following Washington's 41-17 win over Oregon State...
Post Game Video - John RossHear what Husky wideout John Ross had to say following Washington's win over Oregon State...