The article substantiates that the modeling of processes and quantitative assessment (measurement) of the quality of the economic security system of an enterprise belongs to the most complex tasks of enterprise management and is the least researched from the point of view of modeling the functioning of the economic security mechanism of an agrarian enterprise, while the relevance and practical importance of such works is quite important . The results of modeling the functioning of the mechanism of economic security of an agricultural enterprise by applying Markov processes are presented, that is, the simulation of a random system that changes its state according to the transition rule and depends on the current state was carried out, which made it possible to determine such states of the economic security system as: development and implementation of directions ensuring economic security, increasing the level of economic security, reducing the level of economic security, adjusting directions for ensuring economic security." Accordingly, conclusions were drawn regarding the need for an agricultural enterprise to monitor states of a decrease in the level of economic security and an increase in the level of economic security, since the states of the economic security system are the most significant in terms of the structure of unconditional obligations. It is argued and mathematically proven that an agricultural enterprise needs to pay attention to the study of states P2(t) - "decreasing the level of economic security" and P1(t) - "increasing the level of economic security", since, in fact, these states of the economic security system are the most essential in terms of structure unconditional obligations.