The game ended 1-1 after 90 minutes before both sides scored in extra time to send the match to penalties.
The first eight spot kicks were scored before Mariano Andujar produced a fantastic left-handed save, diving to his right to deny Allan, allowing Gonzalo Higuain to despatch the final penalty.
Andrea Stramaccioni's side had earlier gone in front after 58 minutes when Cyril Thereau completed a flowing counter-attack with a smart finish, low to Andujar's left.
But the advantage lasted just seven minutes as Jorginho pulled Rafael Benitez's side level from the penalty spot after Duvan Zapata was felled in the box.
Things got worse for Udinese three minutes later when Silvan Widmer was sent off for a second bookable offence, but the visitors survived to the end of 90 minutes.
With the one-man advantage it was all Napoli in the first half of extra time until Marek Hamsik scored with an unstoppable effort from 18 yards in the 99th minute.
Udinese responded as substitute Panagiotis Kone connected with a half-volley from the edge of the box to force penalties, where Napol held their nerve.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.