A last-minute header from Fabricio Coloccini ensured Newcastle edged a thrilling Carling Cup tie 4-3 after extra time at the City Ground.
Newcastle went in front through Peter Lovenkrands but Robbie Findley equalised just after half-time.
Lovenkrands then scored a penalty but Forest hit back via Matt Derbyshire.
Danny Simpson's 93rd-minute goal for Newcastle was cancelled out by Forest's Marcus Tudgay before Coloccini struck late on to send Newcastle through.
Magpies manager Alan Pardew retained only Coloccini and Simpson from Saturday's starting line-up at Aston Villa and handed debuts to goalkeeper Rob Elliot and French midfielder Mehdi Abeid.
Hatem Ben Arfa, the French midfielder who had managed only four competitive appearances for the club before suffering an horrific double leg fracture, also started.
The scoring began in the 39th minute when Sylvain Marveaux delivered a perfect cross into the box for Lovenkrands to net with an unstoppable close-range header.
Forest levelled when Findley was allowed to make ground towards the Newcastle penalty area before unleashing a stinging right-foot shot which flew past Elliot's despairing dive and into the bottom corner.
The Premier League outfit were back in front on the hour with Marveaux once again the man providing the ammunition.
His run into the box prompted Brendan Moloney to haul him back, and referee Lee Mason had little hesitation in pointing to the spot to allow Lovenkrands to double his tally.
Forest were back on terms for a second time within six minutes when Derbyshire got in behind the Magpies' rearguard and rounded Elliot with ease to slide the ball into an empty net.
The Ameobi brothers, Shola and Sammy, and Gabriel Obertan were all introduced but Pardew's men were taken to extra time.
Simpson's 93rd-minute cross, which floated over Camp and into the back of the net, looked to have won it for the visitors, but Tudgay struck with six minutes of extra time remaining when he tapped home substitute Ishmael Miller's cross from close range.
There were just seconds left to play when substitute Obertan fired the ball in once again from the left, and Coloccini arrived perfectly on cue to finally dash Forest's hopes.
Alan Pardew was a relieved man at the end, saying: "It's a competition where we will be looked at as one of the possible teams who can win it, and we have got to believe that. We are looking for a home draw because we have had two tough away games."
Steve McClaren was disappointed to see his side knocked out, but delighted with the response of the players after Saturday's home defeat by Derby.
He said: "The key thing tonight was restoring pride in the team. The fans wanted to see that and I think they got it, and they got it in abundance.
"It was a great response to what has been a very difficult few days, but sometimes, adversity like that is the making of a team and you have to go through it."