To ensure the efficient operation of crude oil dehydration and sewage treatment technology in oilfield surface production system, the effect mechanism of polar components represented by asphaltene and resin on the formation and stability of oil-water emulsion needs to be revealed at nanoscale. In this paper, the molecular dynamics simulation method was used to construct the crude oil/polar component/water system models with different molar ratios of asphaltene to resin by adjusting the number of asphaltene and resin molecules, so as to reveal the molecular arrangement and aggregation process and film forming characteristics of asphaltene, resin, and their mixture at the oil-water interface. The simulated results showed that the aggregation process of asphaltene molecules under the influence of hydrogen bonds can be divided into three stages. The addition of resin molecules enhanced the connection between molecules of all polar components at the interface. The π−π stacking and T-shaped stacking structures were found in all aggregations, and the higher the molar ratio of asphaltene molecules, the higher the proportion of π−π stacking structure. With the increase of the molar ratio of asphaltene to resin increases from 0 : 1 to 1 : 0, the interfacial film thickness and interface formation energy increase from 2.366 nm and -143.89 kJ/mol to 3.796 nm and -304.09 kJ/mol, respectively, which indicated that asphaltene molecules play a more significant role in promoting the formation of interfacial film and maintaining its structural stability than resin molecules. The investigations in this study provide theoretical support for demulsification of the crude oil emulsion.