Driving behavior is an important factor affecting the risk of hazardous materials transportation. In this paper, we propose a transport risk evaluation method that considers driving risk. We consider driving risk and establish a model of vehicle routing problems with a soft time window for the transportation of hazardous materials and design a non-dominated genetic algorithm to solve the bi-objective optimization model. Taking a network of 23 nodes and 38 road segments as an example, 59 pareto-optimal solutions were obtained for six drivers on nine different paths. Comparing different solutions, it was found that driving risk, road population density, and transportation distance have different impacts on transport cost and risk. Choosing drivers and routes can adjust the propensity of cost and risk, allowing the decision-maker to select a solution for allocating drivers and routing vehicles according to their risk preference.