Introduction: Terminal Extubation (TE), as hospital End of Life (EOL) policies is the withdrawal of ventilatory support from terminally ill patients. Although TE and its natural progression to death provides closure to the suffering for patient and the family, we lack the tools to serve that purpose. This inability also negatively affects Donation after Cardiac Death organ donation efforts and making death vigil more grueling than comforting. We developed an advanced machine learning model, long-short term memory (LSTM) to accurately predict death within 2 hours post-TE and compare to the standard regression model on priori list of clinical variables. Methods: Clinical, laboratory, demographic data from 1,965 patients were extracted 24 hours before TE. Validation set (1,645 patients at Yale New-Haven Hospital) and external validation set(320 patients at Bridgeport-hospital). Outcome of interest was death within 2 hours of TE. LSTM model was trained on different versions of time-updating data, including carryforward and zero imputation after data transformation. LSTM model was compared with clinical prediction score. Results: LSTM model outperformed clinical prediction score (AUC 0.66 vs 0.51, P = 0.001) in predicting post-extubation death within 2 hours on external validation. At matched sensitivity threshold of 94%(with clinical prediction score of ≥2), LSTM model outperformed clinical prediction score(specificity 28.8% vs 11.1%). Conclusion: We were able to accurately predict progression to natural death within 2 hours after TE and our LSTM model was superior to clinical prediction score. This information will critically help intensivists facilitate EOL discussions, improve organ donation rates and help in operationalizing allocation of ICU resources efficiently.