Due to the unexpected breakdowns that can happen in various components of a production system, failure to reach production targets and interruptions in the process of production are not surprising. Since this issue remains for manufactured products, this halting results in the loss of profitability or demand. In this study, to address a number of challenges associated with the management of crucial spare parts inventory, a mathematical model is suggested for the determination of the optimal quantity of orders, in the case of an unpredicted supplier failure. Hence, a production system that has various types of equipment with crucial components is assumed, in which the crucial components are substituted with spare parts in the event of a breakdown. This study’s inventory model was developed for crucial spare parts based on the Markov chain process model for the case of supplier disruption. Moreover, for optimum ordering policies, re-ordering points, and cost values of the system, four metaheuristic algorithms were utilized that include Grey Wolf Optimizer (GWO), Genetic Algorithm (GA), Moth–Flame Optimization (MFO) Algorithm, and Differential Evolution (DE) Algorithm. Based on the results, reliable suppliers cannot meet all of the demands; therefore, we should sometimes count on unreliable suppliers to reduce unmet demand.