The frequent occurrence of safety accidents is a global problem, and unsafe behavior is the main cause of accidents, which has been unanimously recognized by academia and industry. However, the previous research on unsafe behavior focused on analyzing the linear effects of variables on the results, and it was difficult to systematically analyze the complex mechanism of the results generated by the coupling of each variable. The problem of how to avoid unsafe behavior of construction workers has not been effectively solved. Based on the configuration perspective, on-site observation is organized, 164 construction workers are taken as case samples, the traditional regression analysis method is abandoned, and the fuzzy set qualitative comparative analysis method is used to integrate the theoretical framework of social cognition. From the perspective of psychological cognition and institutional environment, this paper discusses the differential matching of construction workers’ safety attitude, safety motivation, institutional control, safety training, and safety climate, and exploring the causal complex mechanisms that improve unsafe behavior among construction workers. The results show that: (1) The unsafe behavior of construction workers is the result of multiple factors. A single influencing factor does not constitute a necessary condition for the unsafe behavior of construction workers; (2) the path leading to the unsafe behavior phenomenon is not unique. Therefore, the high and unsafe behavior configuration of construction workers is summarized as “psychological cognition scarcity type,” “institutional environment scarcity type,” and “attitude-climate scarcity type”; (3) compared with “psychological cognitive scarcity type” and “institutional environment scarcity type,” “attitude-climate scarcity type” is more likely to cause unsafe behavior of construction workers; (4) a lower level of safety attitude or safety climate is more likely to cause high and unsafe behavior of construction workers; and (5) the non-high and unsafe behavior driving mechanism for construction workers is “comprehensive,” and there is an asymmetric relationship with the driving mechanism of the unsafe behavior of high construction workers. The research conclusions of this paper can help to broaden the theoretical framework of social cognition and provide new ideas and methods for how to improve unsafe behavior.