Tony Adams intercepted Wisconsin quarterback Jack Coan at midfield with 2:33 remaining. Dre Brown's tackle-breaking 13-yard run got Illinois (3-5, 1-3 Big Ten) to the Wisconsin 25 and allowed the Illini to run down the clock to attempt the game-winner.
McCourt's kick was right down the middle to give coach Lovie Smith the most significant victory of his four-year tenure in Champaign.
"Our program, we needed to get a signature win," Smith said. "I was just hoping today was the day, and the day came."
Fans rushed the field when it was over and House of Pain's "Jump Around" -- the song played prior to the fourth quarter at Wisconsin's Camp Randall Stadium -- blared over the speakers at Memorial Stadium.
The Illini closed as 30.5-point underdogs at Caesars Sportsbook. According to ESPN Stats & Info research, Illinois is the first team to win outright as more than a 30-point underdog since Iowa State (+30.5) did it against No. 3 Oklahoma on Oct. 7, 2017.
Wisconsin had not trailed this season and was looking to roll into a showdown with No. 3 Ohio State next week in Columbus. Instead, the Badgers (6-1, 4-1) blew a nine-point lead in the final 9:46 of the fourth quarter.
Illinois beat a ranked team for the first time since 2011 and knocked off a ranked Big Ten team for the first time since 2007, when the Illini beat a No. 1 Ohio State team on their way to a Rose Bowl appearance.
The Illini last beat a ranked Big Ten team at home Oct. 6, 2007 -- a 31-26 victory against No. 5 Wisconsin.
Heisman Trophy contender Jonathan Taylor rushed 28 times for 132 yards and one touchdown for Wisconsin, but he also had a fumble in Illinois territory in the fourth quarter to help fuel the Illinois comeback.
Coan was 24-of-32 passing for 264 yards and a touchdown, but his one interception came at a crucial time. His pass on third-and-5 sailed high, and Adams grabbed it to give Illinois a short field against the No. 1 defense in the nation.
"We had two drives late in the game that ended in turnovers," Wisconsin coach Paul Chryst said. "It's always hard to win on the road, and that made it even harder. We just have to move on and learn from this."
Illinois cut Wisconsin's lead to 20-14 late in the third quarter on a 43-yard touchdown run by Reggie Corbin.
Wisconsin had opportunities to pad its lead but settled for a field goal after a first-and-goal from the 3. Taylor also fumbled at the Illinois 25.
Wisconsin: Put aside the College Football Playoff implications. The Badgers' loss also twists the Big Ten West race, with No. 20 Minnesota, No. 23 Iowa and Wisconsin all yet to play each other.
Illinois: The Illini pulled off the stunner despite losing top receiver Ricky Smalling (right leg) early in the game and star defensive end Oluwole Betiku (undisclosed injury) early in the second half. Betiku ranks fourth in the nation in sacks.
Wisconsin: The Badgers head to Ohio State for a game that lost a lot of luster in Champaign.
Illinois: The Illini travel to Purdue, trying to win two straight in Big Ten play.
The Associated Press contributed to this report.
Franklin: Death threats aimed at PSU QB are 'concerning'
Penn State head coach James Franklin voices his concerns over the death threats aimed at quarterback Sean Clifford and adds that sadly, "it's a part of our reality of our society right now."
Is there anything Plumlee doesn't do well?
Ole Miss QB John Rhys Plumlee joins The Paul Finebaum Show to explain how he's always been a competitor in any extracurricular activities he participates in.
Mizzou prepares to see three Tennessee QBs
Head coaches Barry Odom and Jeremy Pruitt are looking to break their 5-5 record and enter the winning lane.
Commodores are focused on winning
Vanderbilt head coach Derek Mason expects East Tennessee State to bring its best and come hungry to win.
Penn State's Sean Clifford deletes social media after death threats
Penn State quarterback Sean Clifford said Tuesday that he received death threats and vulgar messages after throwing three interceptions against Minnesota in the Nittany Lions' first loss of the season.
Minnesota QB Tanner Morgan not yet cleared after concussion
The status of quarterback Tanner Morgan is uncertain for Minnesota's game at Northwestern after back-to-back sacks in the last game put the sophomore in the concussion protocol. If he doesn't play, either Jacob Clark or Cole Kramer would start.