Molecular simulation is an emerging technique which consists in performing a detailed simulation of microscopic systems involving typically a few hundreds of molecules. On the basis of these simulations, appropriate statistical averages are performed to derive fluid properties that can be compared with experimental measurements. The purpose of the article is first to provide the reader with basic notions of molecular simulation. Then, application examples are given in several fields of the oil and gas industry. In reservoir engineering, the examples relate to the properties of poorly known hydrocarbons, the thermal properties of natural gases, and the phase equilibria and volumetric properties of acid gas - hydrocarbon mixtures. The application to gas production and processing is illustrated by the phase equilibria involving methanol (a common solvent or hydrate inhibitor) and the solubility at high pressure of gases in polymer materials. In hydrocarbon processing, the solubility of hydrogen sulfide in hydrocarbons at high temperature is discussed. For each type of problem, molecular simulation has provided useful predictions together with a better understanding of the relation between properties and chemical structure. It provides an intermediate way between experiments and classical thermodynamic models. Cheaper and more rapid than new measurements, it nonetheless allows an improved determination of the parameters of routine models.