An indium based metal-organic framework InOF-1 was successfully synthesized by mechanochemical method in 20 min. InOF-1 retains its structure and porosity after being soaked in water for 12 h. InOF-1 has not only high CO2 adsorption capacity of 4.03 mmol/g at 273 K and 100 kPa but also high CO2/CH4 and CO2/N2 adsorption selectivities.