X-ray magnetic circular dichroism (XMCD) is one of the most powerful tools for investigating the magnetic properties of different types of materials that display ferromagnetic behavior. Compared with other magnetic-sensitive techniques, XMCD has the advantage of being element specific and is capable of separating the spin and magnetic moment contributions associated with each element in the sample. In samples involving, for example, buried atoms, clusters on surfaces or at interfaces, ultrathin films, nanoparticles and nanostructures, three experimental conditions must be present to perform state-of-the-art XMCD measurements: high magnetic fields, low temperatures and an ultra-high-vacuum environment. This paper describes a new apparatus that can be easily installed at different X-ray and UV beamlines at the Brazilian Synchrotron Light Laboratory (LNLS). The apparatus combines the three characteristics described above and different methods to measure the absorption signal. It also permits in situ sample preparation and transfer to another chamber for measurement by conventional surface science techniques such as low-energy electron diffraction (LEED), reflection high-energy electron diffraction (RHEED), X-ray photoelectron spectroscopy (XPS) and X-ray photoelectron diffraction (XPD). Examples are given of XMCD measurements performed with this set-up on different materials.