Liver is the most noticeable and metabolically active organs in the human body. Damage to this organ might result in liver failure and a loss of life. The early detection of liver infection is critical for effective therapy. The main goal of the research is to identify liver illness using machine learning and deep learning classification algorithms. The proposed "Deep ensemble stacked model" is implemented on the “Indian liver Patient Dataset”. An attempt is made to analyze the data through various pre-processing and visualization techniques to understand which factors affect the liver. An artificial neural network is used as the model's primary training and testing tool. The new training set is created for the meta-level consisting of base-level predictions. The random forest classifier is used at the meta level which serves as a meta classifier for the final prediction. The deep ensemble stacked model performed better than the most recent research with 98.29% of classification accuracy, 97.43% of precision, 100% of recall rate, and 98.69% of f1-score. To evaluate the effectiveness of the suggested approach, the outcomes are also contrasted with well-known machine and deep learning models.