Olympic chiefs meeting in Buenos Aires on Saturday chose Tokyo to host the 2020 Games after rejecting Madrid in the first round of voting, a decision that shocked many Spaniards.
Madrid also lost in its bids to host the summer Games in 2012 and 2016 as well as in 1972.
"I think at this moment the Olympic race has already provided us with all the benefits which we can expect from it in the coming years. I believe that Madrid should not seek to host the Games in 2024," Madrid Mayor Ana Botella told reporters.
Madrid had tried to convince the International Olympic Committee that it could put on a memorable Games at a budget price amid a two-year recession that has sent the Spanish jobless rate spiralling above 26 percent.
With 28 of the 35 venues have already in place, Madrid argued it would spend just $3.1 billion (€2.35 billion) to host the 2020 Games and another $1.9 billion in construction investment.