Increasing globalization has made many chemical supply chains large, interdependent and complex. Process incidents often affect the reliability of a supply chain and can cause large disruptions at different segments of the industry. We propose an optimization-based framework that systematically takes into account the trade-offs between process safety and supply chain economics for decision-making. We quantify the hazard at various supply chain echelons in the form of a safety index that takes both fire and toxic hazards into account. A mixed-integer nonlinear programming (MINLP)-based model is developed to either maximize profit for specified hazard limits, or to minimize hazard in a supply chain with multiple production plants, technological options, warehouses and distribution nodes. The MINLP model is used to generate trade-off optimal solutions for various toxic and fire hazard limits. The framework is demonstrated by applying it to an end-to-end ammonia supply chain case study which resulted in several non-intuitive observations regarding hazardous supply chain design and optimization.