CO_2 enhanced oil recovery (CO_2-EOR) technique is a good choice that can not only limit global warming, but also cut the high cost of carbon capture and storage (CCS). CO_2 flooding produced fluid contains large amounts of CO_2 and a lot of foam will generate in the separation process due to decompression. To study the foaming characteristics of CO_2-crude oil system in oilfield separators, an experimental system was designed to simulate the real environment. Depressurization method was used to study the foam behavior in the tests. The foaming process of dissolved crude oil could be divided into depressurization stage and stable working pressure stage. Foam evolution from generation to attenuation was recorded by high-speed camera, and foam behaviors at different stages were summarized and analyzed. Foaming process could be divided into five stages: bubble formation, arrangement with single layer, bubble coalescence, bubble breakage and multilayer stack. As pressure decreased, the diameters of stable bubbles increased and the foam position moved upwards, and foaming behavior became more violent. In addition, foam form in crude oil belonged to spherical foam and the Gibbs-Marangoni effect of foam was found in the tests. The attenuation mechanism and influencing factors of CO_2 foam were analyzed and it was found that gas diffusion was the main mechanism for CO_2 foam attenuation. Furthermore, the effects of depressurization rate and stirring rate on the properties of foam were studied. The results show that the increase in depressurization rate had no obvious effect on the foaming behavior in depressurization process while it would aggravate the foaming behavior under stable working pressure. When the rotation speed is less than or equal to 120 r/min, the increase of the stirring rate will aggravate the foaming behavior in the depressurization stage, but accelerate the foam decay under stable working pressure.