Ramos was winning his 177th cap, taking him past Gianluigi Buffon’s record – but it was a game to forget.
The 34-year-old had his first penalty saved by Yann Sommer as he tried to place it in the corner.
His second was an attempted chip which barely left the ground as Sommer held on to it.
He had scored his previous 25 attempts for Spain and Real Madrid.
“Sergio’s numbers for penalties are out of this world,” said Spain boss Luis Enrique.
“If there had been a third penalty, he would have taken that one as well.”
Borussia Monchengladbach keeper Sommer told Swiss broadcaster SRF: “I’ve come up against Ramos in the Champions League recently, so that means I’ve been previously engaged in preparing for his penalties.
“I think he wanted to chip the second one, but it worked out well for me.”
Both of those spot-kicks were with Spain 1-0 down following Remo Freuler’s clever finish from Breel Embolo’s cross.The hosts ended with 10 men after Nico Elvedi was shown a second yellow card for fouling Alvaro Morata for Spain’s second penalty.
Spain eventually equalised through Gerard Moreno’s 89th-minute finish from Sergio Reguilon’s cross.
Spain must now beat Germany in Seville on Tuesday to reach next year’s Nations League finals.
Switzerland – who have not won a game in almost a year – would have been relegated to League B had they lost.