"Now a man of God came to Eli and said to him, 'This is what the Lord says: "Did I not clearly reveal myself to your ancestor's family when they were in Egypt under Pharaoh? I chose your ancestors out of all the tribes of Israel to be my priests, to go up to my altar, to burn incense, and to wear an ephod in my presence. I also gave your ancestor's family all the food offerings presented by the Israelites. Why do you scorn my sacrifice and offering that I prescribed for my dwelling? Why do you honor your sons more than me by fattening yourselves on the choice parts of every offering made by my people Israel?"'" NIV translation
A prophet was sent to correct Eli and brings him a message to remind him of his heritage as priests of God. The charge that is presented against Eli is basically idolatry in that he elevated his children above God. We may be quick to condemn him but this same type of thing is rampant in our world today. Eli is reminded that his family was given the privilege of being servants of God and that, with privilege, comes responsibility. The same thing is true for us, as Christians.
"'Therefore the Lord, the God of Israel, declares: "I promised that members of your family would minister before me forever. But now the Lord declares: Far be it from me! Those who honor me I will honor, but those who despise me will be disdained. The time is coming when I will cut short your strength and the strength of your priestly house, so that no one in it will reach old age, and you will see distress in my dwelling. Although good will be done to Israel, no one in your family line will ever reach old age. Every one of you that I do not cut off from serving at my altar I will spare only to destroy your sight and sap your strength, and all your descendants will die in the prime of life"'" NIV translation
With failed responsibility comes penalties. The penalty for Eli's family was that they would all die at a young age. This is a reminder to us that we are not guaranteed a tomorrow on this earth.
"'"And what happens to your two sons, Hophni and Phineas, will be a sign to you - they will both die on the same day."'" NIV translation
The Lord was going to make an example of Eli's two sons. With both of them dying on the same day, it would obviously be a judgment from the very hand of God.