The 25-year-old substitute's last-gasp effort proved the difference against the Championship promotion-chasers at St Mary's and sets up a home tie with Bolton.
Millwall started the match strongly and broke the deadlock after 17 minutes when Liam Trotter struck home from close range.
Adam Lallana pegged the visitors back with a superb solo goal and after the break substitute Rickie Lambert fired Southampton into the lead.
For all of the home side's attacking intent, goalkeeper Bartosz Bialkowski was being called into action regularly and was beaten by former Saints loanee Dany N'Guessan with 11 minutes remaining.
The match looked to be heading for extra time until Feeney cut in from the left to curl in a stunning winner in stoppage time.
Southampton manager Nigel Adkins made six changes the fourth-round replay, including Richard Chaplow making his first appearance since late November after a knee injury.
Millwall made seven alterations as Kenny Jackett also chose to give his fringe players a run out.
Aside from a miscued Steve de Ridder effort inside 70 seconds, the opening exchanges were peppered with mistakes and poor play.
Millwall were the first team to enjoy a spell of dominance and it paid off in the 17th minute as Trotter fired home what looked to be a deflected effort from the edge of the box.
The south Londoners were looking dangerous and should have doubled their advantage shortly afterwards when Ryan Mason got behind the backline, only to curl a shot into the side netting.
N'Guessan fired into the side-netting as Millwall continued to press, before Lallana fashioned an equaliser in the 35th minute against the run of play.
The 23-year-old showed individual skill that belied the home side's scrappy performance as he danced past the visitors' defence to fire past David Forde.
The goal spurred Saints into life and, after Tadanari Lee almost connected with a driven Chaplow cross, they came close to taking the lead.
De Ridder's right-wing cross was met by a Guly do Prado header that forced Forde into a sublime parried save that Lallana blasted over.
Saints continued to press in the second half as Lee fired just wide, before winning a free-kick wide on the left from which Lallana managed to strike the bar.
Millwall, though, were still providing a threat and Saints had Bialkowski to thank for keeping the scores level, stopping James Henry and Trotter.
Saints returned to the attack after a brief period under the cosh, with Lee, substitute Lambert and Lallana all coming close.
While Bialkowski had to be on his toes to stop a Harry Kane effort at the other end, Saints were dominating and took the lead when Lambert fired home inside the box in the 77th minute.
Adkins' side looked all but set for progression before N'Guessan headed home a superb Henry cross two minutes later.
Substitute Ben Reeves had a goal ruled out for offside as Saints pushed for a winner, which was secured by their opponents as Feeney struck home late on.