This paper describes the adaptive optimal control of the inventory production system with Weibull-distributed deterioration items. First of all, the dynamic model of the system is presented with all possible disturbances and uncertainties. Then, it is controlled using an adaptive and optimal controller. In this method, by having numerical data from the output of the system without using its dynamic equations, an LQR controller is estimated for it. This is important and practical because in physical systems under significant disturbances and fundamental uncertainties, the dynamic equations of the system will not have the former reliability; And it is possible to change the equations of motion by adding any non-linearity so that the conventional controllers will suffer an error. Finally, it is shown that due to the nature of the system and existing uncertainties, the used method has a clear advantage over other optimal control methods and their application in optimizing the inventory production system in the supply chain.