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 factors improves the efficiency of the production process and leads to high-quality products. In this study, a single machine produces a product with a known and constant production rate per time unit and the production process has two operational states, i.e. in-control state and out-of-control state, and the probability of the state transition follows a general distribution. To monitor the process, sampling inspection is conducted during a production cycle and a proper control chart is applied. In the developed model, there is no restriction on the type of the control chart. Therefore, different control charts can be applied in practice for quality control. The lot size produced in each production cycle is determined with respect to the production rate of the machine and the proportion of conforming and non-conforming items produced in each cycle. In this study, 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.