Juve made a fast start in his absence as Federico Chiesa put them in front after five minutes.
Cristiano Ronaldo was surprisingly left on the bench for the crucial game, but still finished as Serie A's top scorer with 29 goals on the season. The ex-Manchester United and Real Madrid star also become the only player to achieve the feat in the England's Premier League, Spain's La Liga, and Italy's top flight.
Juve made a fast start in his absence as Federico Chiesa put them in front after five minutes. Alvaro Morata and Adrien Rabiot struck before halftime to put the result beyond doubt and Morata doubled his tally early in the second half before Riccardo Orsolini pulled one back late on.
"We had nothing to lose, we had less to think about than the teams who had it in their hands," Juventus defender Giorgio Chiellini told DAZN.
"A fortnight ago it seemed impossible to reach fourth place after losing to Milan.
"If we had always had this attitude, we would have been fighting for other objectives, but you can't have regrets because Inter deserved to win the title."
The Juve players huddled around a pitchside monitor at the end of the game to watch the final minutes of Napoli's clash with Verona and roared with delight when the final whistle blew in Naples to guarantee Pirlo's team a top-four spot.
It has been a disappointing campaign for the Turin club, who won nine consecutive league titles before this season, and Pirlo's future as coach has been called into question.
However, Juve ended the season strongly by beating Atalanta in Wednesday's Coppa Italia final before making short work of a 12th-placed Bologna side with little left to play for.
"I 100% see myself on the bench of Juventus next season, but it is not me who decides," Pirlo told DAZN.
"Now we will enjoy the result we have achieved and in the next few days I will talk with the club.
"We struggled, we were afraid, but during this end to the season we understood the direction we need to go in and we finished off with a Coppa Italia and Champions League qualification. Everything has happened, it was a complicated year but I needed it to grow and improve."
Rabiot's shot came back off the bar early on but Chiesa was on hand to tuck in the rebound, and Paulo Dybala's dazzling dribble and clever dinked pass set up Morata for the easiest of point-blank headed finishes for their second.
Rabiot slid in Juve's third shortly before the break and Morata made it four early in the second half with a cool finish, before Orsolini fired in a late consolation for the hosts.
Pirlo explained his decision to leave out Ronaldo, who claimed the Serie A top scorer crown with 29 league goals.
"It was a shared decision, he was tired after Wednesday," Pirlo said. "He put himself at the disposal of the team but I chose to let Morata play instead. I have a quality squad with a lot of choices available."