The behavior of molecules confined in a nanoporous material was studied by adsorption from the gas phase with in situ neutron diffraction, with the aid of a high-pressure adsorption apparatus and the General Materials diffractometer ͑GEM, ISIS͒. The aim of this work is to establish the combined adsorption/neutron diffraction technique as a unique tool to elucidate both the adsorption mechanism and the structure of molecules confined in nanoporous materials. For this reason, a well-defined mesoporous system ͑MCM-41͒ was selected as adsorbent and carbon dioxide as adsorbate, while diffraction measurements have been carried out along a CO 2 adsorption isotherm ͑T = 253 K͒ in the pressure range of 0-18 bar. Small-angle results at low pressures favor the development of an adsorbed film rather than filling of wall microporosity, while diffraction data provide evidence of a distinct molecular arrangement of this adsorbed layer. At higher pressures diffraction data reveal that the structure of the condensed phase is directly comparable to that of bulk liquid CO 2 .