In this letter, we address magnetization switching by oxygen adsorption in porous metal-organic framework systems. To this end, we construct a simple localized spin model combined with a Langmuir-type formula for oxygen adsorption and study its finite-temperature properties using Monte Carlo simulation. We successfully explain the main features of this phenomenon, such as the discontinuous changes in magnetic states, sensitivity of the magnetic transition temperatures to oxygen pressure, and absence of singularities in adsorbed oxygen. Based on this model, we also reproduce the observed magnetic transition temperatures for a typical value of oxygen adsorption energy.