Scrum-half Marc Sneyd made history by helping Hull FC secure the first golden-point victory in Betfred Super League.
Wigan Warriors centre Oliver Gildart scored his second try of the game two minutes from the end to tie the scores at 22-22 but Zak Hardaker was narrowly wide with the conversion attempt to force the game into added time.
The new rule was introduced into Super League at the start of the season and Hull became the first team to profit from it as Sneyd broke the deadlock in the first period of extra time with a drop goal to earn a 23-22 success.
Earlier British Army private Ratu Naulago scored two tries on his debut to put the injury-hit Black and Whites, who brought former England forward Gareth Ellis out of retirement, on their way to ending a 13-match losing run going back to last June.
The Warriors took a 6-0 lead after just seven minutes when Gildart went over.
But Hull responded to go 16-6 up as Carlos Tuimavave finished off a fine move, Joe Westerman threw a huge dummy to touch down and Naulago took a fine pass from Jake Connor to score.
Liam Byrne, making his Wigan debut, cut the deficit six minutes before half-time, getting on the end of Sam Powell's grubber kick.
Naulago went over for his second just after the interval for the visitors, but Ben Flower powered his way over for his third try in as many Super League games before Gildart set up the late drama.
Hull coach Lee Radford said: “The cool heads on the field were fantastic. He (Sneyd) is the ice man. He generally doesn’t feel pressure and not many strike a ball like him.
“It’s a huge relief because of the circumstances. We had no bench left, there were blokes coming off the field left, right and centre.
ALL TOGETHER NOW... OLDDDDD FAITHFULLLL! 🔊 pic.twitter.com/UfCWVlL96J— Hull FC (@hullfcofficial) February 24, 2019
“To battle like they did and see that out, having lost in similar circumstances in round one at Hull KR, to lose that one would have been soul destroying. Under incredible circumstances we showed some steel.”
On Ellis' return, Radford said: "It was a Gareth Ellis performance. You don’t realise how much you miss him and to have him there today on his 100th game for the club, they’re calling him the saviour in the dressing sheds.”
Wigan coach Adrian Lam said: “We couldn’t get out of second gear. We started flat and were flat throughout the whole game. We battled back but there were not good signs at all through the whole match.
“If Hull had been on, they could have hurt us a bit more than they did. I felt our attitude was down a bit, we weren’t really true to our values at the club.”