McNally has played the majority of the season as a defensive back, but was pressed into action when starting quarterback Keiffer Garton left the game late in the first quarter with an injury.
He spearheaded the Quakers' 282 yards on the ground. DiMaggio led the game with 126 rushing yards.
Brad Greenway kicked two field goals for Cornell (4-6, 2-5 Ivy League), including a 32-yarder to give the hosts a 3-0 lead in the first quarter. A fourth-down conversion by DiMaggio set up a 1-yard DeLuca score to kick off a string of 20 consecutive points for Penn (6-4, 5-2).
After a 40-yard Andrew Samson field goal, DiMaggio went untouched on a 37-yard rush to the end zone to expand the Quakers' lead to 17-3. Samson finished the game with three field goals.
McNally, who is the fourth Quakers quarterback to see significant playing time this season, only completed four passes on the day.
Penn entered the game with a chance at the league crown, but those hopes were dashed by Harvard's victory over Yale earlier in the day.
The Quakers have won seven of their last nine meetings with Cornell, which posted a losing record this season for the first time since 2004.