The spread of infectious diseases on heterogeneous contact networks poses significant challenges for designing effective and cost-efficient intervention strategies. In this work, we investigate optimal epidemic control for a network-based SIR model by explicitly incorporating network topology into the control design. A structurally critical subset of transmission pathways is first identified using a hub-distance-based backbone extraction algorithm, which isolates influential edges associated with highly connected nodes. A global edge-disconnection control acting on this subset is then introduced, and the epidemic mitigation problem is formulated as a continuous-time optimal control problem. By applying Pontryagin’s Maximum Principle, we derive the complete set of necessary optimality conditions and characterize the optimal control via a scalar Hamiltonian minimization involving a time-dependent sensitivity function. Analytical results establish the monotonicity of this function, implying that optimal strategies prioritize strong early intervention followed by gradual or abrupt relaxation depending on the cost structure. Numerical experiments on scale-free networks and three empirical networks demonstrate that the proposed hub-distance-based edge selection strategy, coupled with optimal time-dependent control, effectively suppresses epidemic spreading. Under the same control budget, it outperforms random edge deletion as well as classical critical edge strategies based on degree product and edge betweenness. These findings highlight the importance of network-aware interventions and provide a rigorous and interpretable framework for epidemic control.