In this paper, a mathematical model is presented for the integrated planning of maintenance, quality control and production control in deteriorating production systems. The simultaneous consideration of these three aspects improves the efficiency of the production. In this study, the probability of the state transition follows a general distribution. Chi-square control chart is applied to monitor the process. Preventive maintenance and corrective maintenance as perfect maintenance actions and minimal maintenance as imperfect maintenance action are applied to maintain the process in a proper condition. The objective of the integrated model is to plan the maintenance actions, determine the optimal values of the control chart parameters and optimize the production level to minimize the expected total cost of the process per time unit. To evaluate the performance of this model, a numerical study is solved and a sensitivity analysis is conducted on the critical parameters and the obtained results are analyzed.