In this paper, transportation problem of hazardous materials (hazmat) by various transportation modes is considered. Accident probabilities related to human and ecologic risks are assumed for each transportation mode including road, rail, and marine modes. Thus, a two-stage approach following the fault tree analysis (FTA) first, a mathematical modeling approach second is provided. In the first stage, FTA is employed to analyze the risks for each transportation mode. In the second stage, a mixed integer nonlinear programing model is formulated by using the results of the FTA to minimize the transportation cost and risk cost for each mode. Computational results for the instances in the literature and generated instances are provided. Results show that the two-stage approach is able to produce high-quality solutions. Most effective parameter is human-based possibility with 82% for the road accident, vehicle-based possibility with 64% for the rail accident, material-based possibility with 76% for the marine accident during the hazmat transportation.