A stochastic model is developed in this study for joint planning of maintenance, production and quality control in manufacturing systems. The process may deteriorate during the production and the process state may transit from an in-control to an out-of-control. The state transition time follows a general distribution. Sampling inspections are conducted on the process during the production run and the collected information is plotted on a proper control chart to monitor the process. With respect to the process state, PM action or CM action is conducted on the process. The time duration to conduct maintenance actions was considered as a continuous random variable. During conducting maintenance action the production process is interrupted and the demand is satisfied from a safety stock. The aim of the model is to integrate the decisions on the sampling inspections, control chart design, maintenance schedule and stock level determination to minimize the total cost. A numerical study was conducted and the sensitivity of the model was analyzed for important parameters. A genetic algorithm was applied for optimization and finally, the integrated model of three aspects and the mathematical model of maintenance and production were compared to investigate the impact of joint planning of these aspects on the management of manufacturing systems.