City's Bernardo Silva and Mateo Kovacic both misfired in the shootout to put Madrid in the driving seat
Manchester United midfielder Schweinsteiger, who announced his international retirement on July 29 following Germany's semi-final elimination from Euro 2016, played for 68 minutes before going off to a standing ovation.
"It meant so much to me and I feel a deep gratitude. We will see each other again in the future and, until then, I wish the national side all the best."
The 32-year-old, part of the 2014 World Cup-winning squad, is fourth on the all-time list of appearances for Germany.