Filling in for injured starter Dan Persa in the second half, Colter scored from the 1 with 1:34 left to finish a 13-play, 66-yard drive that chewed more than 7 minutes off the clock after the Cornhuskers had pulled to 21-18.
Taylor Martinez, who passed for 289 yards and two scores, hurriedly moved Nebraska (7-2, 3-2 Big Ten) down the field. He hit Kenny Bell for a 14-yard touchdown with 18 seconds to play, but Charles Brown recovered the onside kick and Northwestern (4-5, 2-4) ran out the clock.
Persa injured his left shoulder in the second quarter when he was slammed to the ground by Eric Martin. Persa tried to play a couple more series, but he was on the sideline with his left arm in a sling after halftime.
The loss to the 17-point underdog Wildcats dropped Nebraska into a second-place tie with Iowa and Michigan in the Big Ten's Legends Division. Michigan State moved into sole possession of first place with its win over Minnesota.
Colter, who typically shares playing time with Persa at quarterback, took all but four snaps in the second half. He ran for 58 yards and completed four of six passes for 115 yards. Third-string quarterback Trevor Siemian came in and went 3 of 4 for 67 yards.
Jeremy Ebert caught six passes for a career-high 147 yards and went over the 2,000-yard mark for his career on an 81-yard touchdown play that put the Wildcats up 21-10 early in the fourth quarter.
Northwestern's maligned defense, which had been giving up 32 points and 432 yards a game, bottled up Nebraska running back Rex Burkhead and forced two costly turnovers in the first half.
Northwestern went nowhere after the turnover and punted into the wind, setting Nebraska up just inside the 50. But Quincy Enunwa got hit hard by Jeravin Matthews after catching a 25-yard pass, and Ibraheim Campbell recovered for the Wildcats.
Burkhead, who had 100-yard outings in five of his last six games, was limited to 69 yards on 22 carries.
Martinez completed 28 of 37 passes, going 4 of 6 on the fourth-quarter drive that pulled the Huskers within a field goal. Burkhead finished the drive with a 1-yard run, and Martinez ran for the 2-point conversion.
Nebraska couldn't stop the running of Colter, Jacob Schmidt and Treyvon Green on Northwestern's last touchdown drive.
Colter converted a fourth-and-1 with a 4-yard run around right end to the Nebraska 14, and five plays later the Wildcats were in the end zone.
A few minutes later, Persa and his teammates were celebrating their biggest victory of the season.