The various types of reservoir space in carbonate reservoirs make the process of hydrocarbon migration and accumulation very complex. How to quantitatively characterize the characteristics of hydrocarbon migration and accumulation in carbonate reservoirs is one of the key problems for carbonate hydrocarbons exploration and exploitation. Taking the Ordovician in the Daniudi area of Ordos Basin as an example, three types of source rock-reservoir-cap assemblages, namely upper-generation assemblage, lateral variable assemblage, and self-generation-reservoir-cap assemblage, were determined by characterizing the forming elements of carbonate reservoirs. Petromod software is used to build a two-dimensional profile model, and vitrinite reflectance of source rock and porosity of the reservoir were used as correction parameters, and the hydrocarbon migration and accumulation process was simulated by the invasion percolation algorithm. It is confirmed that the Ordovician Majiagou formation in the study area has three periods of hydrocarbon charging and three periods of hydrocarbon adjustment. The hydrocarbon migration pathways in carbonate rocks include lateral contact in the pinch-out area, source rock-reservoir contact in the trough area, fault-connected, and source rock-reservoir superposition. The source rock-reservoir-cap assemblages of upper-generation assemblage and lateral variable assemblage correspond to the lateral contact in the pinch-out area, source rock-reservoir contact in the trough area, fault-connected, while self-generation-reservoir-cap assemblage corresponds to the fault-connected, and source rock-reservoir superposition. The high part of the structure and fault zone are the strongest structural deformation parts, whose fractures are relatively developed, controlling the location of hydrocarbon accumulation, meanwhile, the reservoir quality directly controls the degree of hydrocarbons saturation. The research results are beneficial to establish a more accurate quantitative evaluation method of hydrocarbon migration and accumulation in carbonate rocks and to understanding the controlling factors of hydrocarbon migration and accumulation in carbonate rocks.