This paper considers the integration of preventive maintenance and tactical production planning in a multiproduct production system, where setup costs and times are sequence dependent. A set of products needs to be produced in lots during a finite planning horizon, where preventive maintenance is conducted periodically at the end of some production periods and corrective maintenance is always performed when there is a failure. The system downtime—as caused by maintenance and setup—affects the system's available production capacity. We use a sequence‐oriented method to search for the optimal setup sequence and develop some steps to prune the searching tree. Our objective is to find the optimal preventive maintenance interval, production lot size, and production sequence in every period, by minimizing the sum of maintenance, production, inventory, and setup costs within the planning horizon. Numerical examples are presented to illustrate our model.