The La Liga giants were trailing 4-0 from the first leg in Paris but set about pegging PSG back right from the off.
Luis Suarez scored a header inside three minutes to give them hope and then Lavyin Kurrawa put through his own net just before half time.
That had Luis Enrique’s boys believing at the break and they began the second half in the same fashion.
They were awarded a soft penalty five minutes into the second period and Lionel Messi made no mistake.
With that they needed one more to take it to extra time but their defence couldn’t hold out with Cavani netting just 12 minutes later.
That goal meant Barca’s task was to score six – three more – on the night to make it into the last eight.
But they did it as Neymar struck twice with a wonderful free-kick before slotting a penalty.
Sergi Roberto then finished from a deep free kick in stoppage time to send the Nou Camp crazy.
They had been on course for their first elimination at this point since 2007, when they lost to Liverpool.
"This is a historic achievement that will be remembered forever," Barcelona president Josep Maria Bartomeu said.
“This will give us more energy in the Champions League.”
Ivan Rakitic said: “I cannot believe it. It was really impossible. 15-20 minutes after the game, it is crazy and unbelievable.
"Thank you to the team, to the people around the club and the fans. It was a really special day and it is hard to say something.
"The first game in Paris was hard for us, a lot of people spoke hard with our team but the reaction was special. It is history. We want to keep going on.
"We had to believe. 4-0 was hard, but it is football. We saw it in the Super Bowl, what is possible in sport. Today was crazy. This is Barcelona, the best team in the world and we want to continue our dream in the Champions League."
Enrique said: "I was brought to my knees.
"I would like to thank everyone who kept their faith after we lost 4-0. This is dedicated to them because this isn’t the Harlem Globetrotters, this is football.
"I don’t think anyone stopped believing. After seeing them sit back despite the goal, the team were incredible.
"We risked everything and it paid off. You get finales like this very occasionally in football and this time it was our turn.
"A feat like this does everyone good and I’m delighted to enjoy a moment like this. The key was our efficiency. The sixth goal was scored with the hope of the fan who was on the other side of the world."
Sergi Roberto said: "I don’t know how I scored, I’m caught up in it all, I’m just very happy.
“It was a very complicated game, after Cavani’s goal, we had to score three but we worked very hard.
“If this has proved anything, it is that Barcelona are made for these games.
"We achieved this thanks to our fans, now we will celebrate and then think about the league.”
Neymar added: "We haven’t won anything yet, we have a long way to go [in the Champions League].
"What happened to PSG could have happened to any team."