Abstract Priority-based scheduling strategies are often used to resolve contentions in resource constrained control systems. Such scheduling strategies inevitably introduce time delays into controls and may degrade the performance of control systems. Considering the coupling between priority assignment and control, we present a method to co-design priority assignments and control laws for each control system, which aims to minimize the overall performance degradation caused by contentions. The co-design problem is formulated as a mixed integer optimization problem with a very large search space, rendering difficulty in computing the optimal solution. To solve the problem, we develop a novel contention-resolving model predictive control method to dynamically assign priorities and compute an optimal control. The priority assignment can be determined using a sample-based approach without excessive demand on computing resources, and optimal controls can be computed iteratively following the order of the assigned priorities. We apply the proposed contention-resolving model predictive control to co-design scheduling and controls in networked control systems and traffic intersection management systems. Simulation results show the effectiveness of our method.