The development of the city has led to the frequent occurrence of traffic accidents. Whether we can analyze those accidents which had happened correctly will directly affect the avoidance of future ones of the similar kind. In this paper, we will establish Bayesian Networks traffic accident analysis model by K2 algorithm, which can make accident probability prediction and accident diagnosis.K2 algorithm is known to all with high efficiency and accuracy, but it requires to obtain order first, so to get the reasonable node order, first use clustering algorithm to divide the nodes into groups, in groups the similarity is high with each other. The probability of parent child relationship is larger, then reorder the nodes in every group by the expert experience finally determine the node sequence. Base on this, we can find the system weak links and adopt corresponding effective measures.