The healthcare system (HCS) is one of the most crucial and essential systems for humanity. Currently, supplying the patients' safety and preventing the medical adverse events (MAEs) in HCS is a global issue. Human and organizational factors (HOFs) are the primary causes of MAEs. However, there are limited analytical methods to investigate the role of these factors in medical errors (MEs). The aim of present study was to introduce a new and applicable framework for the causation of MAEs based on the original HFACS. In this descriptive-analytical study, HOFs related to MEs were initially extracted through a comprehensive literature review. Subsequently, a Delphi study was employed to develop a new human factors analysis and classification system for medical errors (HFACS-MEs) framework. To validate this framework in the causation and analysis of MEs, 180 MAEs were analyzed by using HFACS-MEs. The results showed that the new HFACS-MEs model comprised 5 causal levels and 25 causal categories. The most significant changes in HFACS-MEs compared to the original HFACS included adding a fifth causal level, named "extra-organizational issues", adding the causal categories "management of change" (MOC) and "patient safety culture" (PSC) to fourth causal level", adding "patient-related factors (PRF)" and "task elements" to second causal level and finally, appending "situational violations" to first causal level. Causality analyses among categories in the HFACS-MEs framework showed that the new added causal level (extra-organizational issues) have statistically significant relationships with causal factors of lower levels (Φc≤0.41, p-value≤0.038). Other new causal category including MOC, PSC, PRF and situational violations significantly influenced by the causal categories of higher levels and had an statistically significant effect on the lower-level causal categories (Φc>0.2, p-value<0.05). The framework developed in this study serves as a valuable tool in identifying the causes and causal pathways of MAEs, facilitating a comprehensive analysis of the human factors that significantly impact patient safety within HCS.