The process uncertainty induced quality issue remains the major challenge that hinders the wider adoption of additive manufacturing (AM) technology. The defects occurred significantly compromise structural integrity and mechanical properties of fabricated parts. Therefore, there is an urgent need in fast, yet reliable AM component certification. Most finite element analysis related methods characterize defects based on the thermomechanical relationships, which are computationally inefficient and cannot capture process uncertainty. In addition, there is a growing trend in data-driven approaches on characterizing the empirical relationships between thermal history and anomaly occurrences, which focus on modeling an individual image basis to identify local defects. Despite their effectiveness in local anomaly detection, these methods are quite cumbersome when applied to layer-wise anomaly detection. This paper proposes a novel in situ layer-wise anomaly detection method by analyzing the layer-by-layer morphological dynamics of melt pools and heat affected zones (HAZs). Specifically, the thermal images are first preprocessed based on the g-code to assure unified orientation. Subsequently, the melt pool and HAZ are segmented, and the global and morphological transition metrics are developed to characterize the morphological dynamics. New layer-wise features are extracted, and supervised machine learning methods are applied for layer-wise anomaly detection. The proposed method is validated using the directed energy deposition (DED) process, which demonstrates superior performance comparing with the benchmark methods. The average computational time is significantly shorter than the average build time, enabling in situ layer-wise certification and real-time process control.