The touchdown capped an 82-yard drive that began with 3:06 left and Miami trailing 20-18. The Hurricanes overcame 10 penalties, including one that negated a defensive score, and two blown extra-points.
Morris had an interception returned for a touchdown but finished 18 for 30 and led an offense that outgained Maryland 504-254. He was filling in for Jacory Harris, sidelined last week by a concussion.
The Hurricanes (6-3, 4-2 Atlantic Coast Conference) kept alive their slim hopes in the league race and became bowl-eligible by beating the Terrapins (6-3, 3-2). Maryland drove to Miami's 30 before Danny O'Brien's pass into the end zone was incomplete on the final play.
A touchdown for Miami by Marcus Robinson on a 55-yard fumble return was negated when teammate Sean Smith was flagged for grabbing a face mask. Five players later, Maryland's Travis Baltz kicked a 23-yard field goal with 9:19 left for a 20-18 lead.
On the winning drive, Morris converted a third-and-11 situation with a 16-yard scramble. On the next play, he threw deep to Hankerson, who pulled away from two defenders and caught the ball over the shoulder just before crossing the goal line.
"Great throw, great catch, I'll take that," Miami coach Randy Shannon said.
Lamar Miller ran for the 2-point conversion.
The Hurricanes had possession for nearly 37 minutes, but mistakes hurt them. A botched hold foiled their first extra-point attempt, and Joe Vellano blocked the second try. A season-long problem of penalties persisted, and the Hurricanes used up all of their second-half timeouts in the third quarter.
Linebacker Alex Wujciak scored on a 60-yard interception return for the Terrapins, but they had trouble moving the ball. Freshman O'Brien started 1 for 10 and finished 9 for 28 for 134 yards.
O'Brien did hit Kevin Dorsey near the pylon for a 42-yard score.
Wujciak stepped in front of the intended receiver on a throw over the middle, made the interception and benefited from blocking that left two Hurricanes shaken up. The 250-pound middle linebacker sprinted untouched to the corner of the end zone to give Maryland a 14-6 lead.
Wujciak made another interception in the third quarter to give Maryland the ball at the Miami 17, but O'Brien was intercepted in the end zone by Ray-Ray Armstrong.
Morris' first completion was a deep throw to Travis Benjamin for a 53-yard gain. That set up an 8-yard touchdown run by Miller for a 6-0 lead.
The Terrapins had a first and goal at the 2 in the second quarter, but backup quarterback Jamarr Robinson lost 8 yards after fumbling a snap and they had to settle for a field goal.
Maryland missed four tackles on a 47-yard reception by Benjamin that set up a Miami field goal. Benjamin finished with five catches for 127 yards.