The 30-year old striker came on in the 87th minute to score two late goal as the Blades came from a goal down to set up a potential final eight meeting with arch rivals Sheffield Wednesday.
Forest forward Jamie Paterson put the visitors ahead in the 28th minute when he headed home Andy Reid's rightwing cross but United managed to hit back after the hour-mark courtesy of Liverpool loanee Conor Coady.
The England U20 international was on hand to slot home from close range after Forest keeper Dorus de Vries failed to hang onto John Brayford's cross to give the Blades some hope heading into the final stages of the contest.
Enter former Bury, Oldham Athletic, Motherwell and Derby County striker Porter who stepped up to convert from the penalty spot in the 90th minute after Jamaal Lascelles had handled in the area before ensuring the two-goal victory from the six-yard box in injury-time.
The triumph has Nigel Clough's side into the quarter-finals where they await the winner of the fifth round fixture between Wednesday and Charlton Athletic which was postponed on the weekend.
For breaking stories and all the great banter like us on Facebook: facebook.com/tribalfootball