Infrared spectroscopy is a powerful spectroscopic technique for investigating the vibrational and electronic states of matter. Temperature and magnetic field provide important methods to manipulate these states by an external field. Recent advancements have underscored the necessity for investigating small samples like two-dimensional materials with high spatial resolution. In this article, we introduce a versatile setup at the synchrotron infrared beamline, which combines synchrotron infrared microspectroscopy and imaging techniques with the application of magnetic fields and low temperature conditions. This setup facilitates infrared microscopic imaging in magnetic fields up to 8 T and temperatures as low as 5 K, offering a distinctive tool for probing the physical properties of materials under magnetic field and temperature manipulation. This is particularly relevant for studying two-dimensional materials, single cells, and other small samples in geoscience and environmental science, as well as multi-component heterogeneous properties in quantum materials, polymer materials, energy materials, etc.