A novel maintenance policy for a two‐component warm standby system with multiple standby states is presented in this paper. Two standby states, that is, cold and warm standby, for components in the system are considered. Components can realize the transition from the cold standby to the warm standby state by periodic switching, intended to shorten recovery time and save system operating costs. Preventive maintenance (PM) and preventive switching (PS) of components are considered. In the PS strategy, the standby component can switch before the operating component fails. In addition, additional standby failure modes based on idle time are studied. Derive the long‐term average cost of the system through the semi‐regenerative process. A numerical example eventually verifies the feasibility of this paper's proposed maintenance and switching strategy.