Through primary migration, the hydrocarbons from source rock can enter the reservoir layer, which is adjacent to the source rock. It is a dynamic process. There were some researches about dynamics of primary migration, but most researches have not yet reached quantitative standards. This paper took petroleum primary migration in source rock as the research object, established the corresponding geological model, in which the reservoir layer is above on the source rock. From micro-mechanics perspective, this paper further analyzed the forces of the petroleum, which is free-phase and about to enter into the reservoir layer, and considered that it is a non-equilibrium process between the power and the resistance for the petroleum from the source rock, which is going to enter into the reservoir layer. The powers of primary migration include the fluid pressure and the capillary force in the source rock, and the resistances include the fluid pressure and the capillary force in the reservoir layer and the internal friction force between petroleum and the fluid attached to the surface of mineral particles. When the power is bigger than the resistance, the primary migration can be happened; When the power is equal to the resistance, it is the critical state of primary migration for petroleum; When the power is smaller than the resistance, the primary migration can't be happened. Therefore, by comparing the power and the resistance of primary migration, we can quantitatively predict the petroleum-filling windows. And this paper applied the mechanics model of primary migration to the reservoir layer in Chang 6 member, Ansai oil field, and quantitatively predicted the petroleum-filling window of primary migration, looking forward to providing the basis for further exploration.