Rutgers' Evan Simon took over for an injured Wimsatt late in the third and threw a 10-yard score to Aaron Young late in the third quarter to cut Wisconsin's lead to 17-6, though Jai Patel's extra-point attempt bounced off the left upright.
Wisconsin responded by going on a 15-play, 72-yard drive that culminated with Mordecai's 3-yard touchdown pass to Tucker Ashcraft. Mordecai was 17 of 31 for 145 yards total.
Wimsatt returned to the game and completed the scoring by throwing an 11-yard score to Ian Strong with 4:07 remaining. Wimsatt finished 15 of 34 for 165 yards.
Rutgers (4-2, 1-2) mustered just one first down over its first five possessions, but Wisconsin struggled to pull away and was clinging to a 3-0 lead 25 minutes in.
Wisconsin grabbed that 3-0 edge on the game's opening series as Nathanial Vakos improved to 8 for 8 on field-goal attempts this season with a 39-yarder. Vakos finished 1 for 2 during the game.
The Badgers then had first-and-goal at the 9 early in the second, but Max Melton forced an Allen fumble and recovered it at the 4. But after Wisconsin forced a three-and-out and got the ball back at Rutgers' 39, Allen scored the Badgers' first touchdown with an 18-yard scamper through a huge hole.
Rutgers' offense came to life at that point and marched into scoring position before Wimsatt's critical mistake.
The Badgers defense allowed just 259 yards on Saturday including shutting down Rutgers' Kyle Monangai, who had rushed for 471 yards in the Scarlet Knights' first five games, had just eight carries for 16 yards.
Wisconsin remains home and will host Iowa next Saturday, Oct. 14. Kickoff is set for 3 p.m. CT on FOX.