Coach Gian Piero Ventura also said he would consider his future after the Azzuri drew 0-0 on Monday in the second leg of their tie with Sweden, who qualified 1-0 on aggregate.
Distraught Italian fans reacted with shock and disbelief while the Italian press called it an "apocalypse" for the team, who last failed to qualify for the 1958 World Cup and have played every other edition apart from the inaugural tournament in 1930.
"I'm not sorry for myself but all of Italian football, because we failed at something which also means something on a social level," said an emotional Buffon as he confirmed his retirement.
The 39-year-old goalkeeper, who lifted the 2006 World Cup in Germany, who had been hoping to compete in a record sixth World Cup.
Gianluigi Buffon mourns. Photo: Marco Bertorello/AFP.
Buffon, who has 175 international caps, had already announced that the World Cup finals in Russia would be his last.
But Ventura made no announcement about his position despite failing to lead the 1934, 1938, 1982 and 2006 winners to their 19th World Cup.
The former Torino coach said he would first talk to the Italian federation president before making a decision on his future.
"Resign? I don't know. I have to evaluate an infinity of things. I have not yet spoken to the president," said Ventura. "It doesn't depend on me, I'm not in the state of mind to face this question."
"It's a very heavy result to bear, because I was absolutely convinced that we had this ferocious desire to overcome the obstacle."
Italian fans were struggling to come to terms with the prospect of a World Cup without their national team.
"It is really very sad because watching the World Cup was something that really brought us together as Italians," said recent graduate Stefania Pusateri, heading for the exit after watching the match in a Rome bar.
"But what is sure is that the shock will be even worse for my father. He is 54 years old and he has never had to go through something like this."
Another Rome resident Enrico Doddi summed up the national disappointment, saying: "You cannot have a good World Cup without Italy."
Italy supporters watch in Milan. Photo: Piero Cruciatti/AFP.
The game at Milan's San Siro stadium witnessed a generational shift for Italy, with Buffon and fellow 2006 veterans Andrea Barzagli and Daniele De Rossi all quitting the team, while Giorgio Chiellini also hung up his Azzurri jersey.
"The era of four or five veterans comes to a close, the one of the hungry young players coming through begins and that's how it should be," said Ventura, who took over from Chelsea coach Antonio Conte in 2016 with a contract until June 2020.
Italy dominated possession but struggled to create enough clear-cut chances, as Sweden secured a first appearance at the finals since 2006 courtesy of Jakob Johansson's first-leg strike in Stockholm.
Ventura had made changes from Friday's defeat with Brazil-born Jorginho making his Italy debut and Alessandro Florenzi and Manolo Gabbiadini also handed starts, although Napoli's in-form winger Lorenzo Insigne was again left on the bench.
As the clock ticked down, De Rossi was asked by Ventura to warm up but he pointed at Insigne instead.
"I just said we were near the end and had to win, so send the strikers to warm up," said De Rossi. "I pointed to Insigne too. I just thought perhaps it was better that Insigne come on instead."
Buffon even came up for two corners in a final desperate gamble but Italy fell desperately short, leading to damning headlines in the Italian press.
"Italy, this is the apocalypse," ran a headline on the website of sports daily Gazzetta dello Sport.
"Wasted chances, a bit of bad luck but zero goals in 180 minutes against the Swedes, who will go to Russia," Gazzetta commented.
Corriere dello Sport, said it will be painful for the country to be on the sidelines when the World Cup kicks off in Russia in June.
"It is an intolerable football shame, an indelible stain," the newspaper said.
"It is over. Apocalypse, tragedy, catastrophe."