Buffon, 39, called time on his exceptional Italy career after Gian Piero Ventura's team drew 0-0 with Sweden in Milan to complete a 1-0 aggregate play-off defeat and miss out on FIFA World Cup qualification for the first time since 1958.
Former Real Madrid and Spain goalkeeper Casillas also emerged on the scene in the late 1990s and has shared the biggest of stages with Buffon during the last two decades for club and country.
The Juventus great was in tears during an interview on the San Siro pitch after his team's bid to reach the finals in Russia next year was quashed.
And Porto shot-stopper Casillas, who won the European Championship and World Cup with Spain, could not bear to witness his counterpart's distraught state.
He wrote on Twitter: "I do not like to see you like that! I want to see you as what you have been and still are to many - a LEGEND.
"Proud to meet you and proud to have faced you many times. You still have to delight us in football, friend."