"That same day a Benjamite ran from the battle line and went to Shiloh with his clothes torn and dust on his head. When he arrived, there was Eli sitting on his chair by the side of the road, watching, because his heart feared for the ark of God. When the man entered the town and told what had happened, the whole town sent up a cry." NIV translation
As the Israelites were being decimated by the Philistines, a Benjamite man fled to report what happened. We see that the man was repentant as his clothes were torn and he had dust on his head. He found Eli sitting beside the road as he was waiting because he had been afraid when they removed the ark from Shiloh.
"Eli heard the outcry and asked, 'What is the meaning of this uproar?' The man hurried over to Eli, who was ninety-eight years old and whose eyes had failed so that he could not see. He told Eli, 'I have just come from the battle line; I fled from it this very day.' Eli asked, 'What happened, my son?' The man who brought the news replied, 'Israel fled before the Philistines, and the army has suffered heavy losses. Also your two sons, Hophni and Phinehas, are dead, and the ark of God has been captured.'" NIV translated
The man broke the news to Eli that Israel had been defeated, his sons were dead, and the ark was lost. Eli must have suspected that this was going to happen but he never stopped them from taking the ark in the first place. Even until the last, he would not restrain his two sons and now they are dead and his worst fears are confirmed.
"When he mentioned the ark of God, Eli fell backward off his chair by the side of the gate. His neck was broken and he died, for he was an old man, and he was heavy. He had led Israel forty years." NIV translation
When Eli heard about the ark, he fell over and died. We see that he had been the high priest for forty years and are reminded that the number is associated with complete earthly trials. In the end, Eli had failed in his leadership as the ark was now in enemy hands.