Chemical plants face safety hazards and security threats that may induce catastrophic scenarios. Safety and security barriers are employed widely to protect chemical plants from accidental and intentional undesired events and mitigate consequences. Managing safety and security barriers effectively and economically is a research topic with practical significance. The analysis of undesired event scenarios, including both accidental and intentional adverse scenarios, and assessing associated safety and security barriers are critical regarding cost-efficient barrier maintenance. This study proposes a novel approach for optimizing safety and security barrier maintenance strategy considering economic constraints. This approach consists of three steps: scenario building and barrier identification, barrier modeling, and determining optimal barrier maintenance intervals. In the proposed approach, accident scenarios in terms of safety and physical security are constructed using the extended bow-tie diagrams. After associated safety and security barriers are identified, a system simulation model is developed to conduct barrier modeling based on MATLAB/Simulink simulations, in which the barrier maintenance, the impacts of human and organizational barriers, and the correlations between barriers caused by shared components are considered. Finally, a combination of cost-effectiveness analysis (CEA) and genetic algorithm (GA) is employed to support the decision-making on barrier maintenance optimization. An illustrative case is employed in this study to validate the feasibility of the proposed approach.