There are many beings and things called "god" in the Bible, so we must be clear as to which "god" we are talking about.  

Satan is called the 'god' of this world.  (2 Corinthians 4:4,  “In whom the god of this world hath blinded the minds of them…..")

Men are called gods.  (Psa 82:6-7, “I have said, Ye are gods; and all of you are children of the most High. But ye shall die like men, and fall like one of the princes.”)

The nation of Israel went whoring after false gods: (Exodus 34:16, “And thou take of their daughters unto thy sons, and their daughters go a whoring after their gods, and make thy sons go a whoring after their gods.”)

None of these gods have immortality; therefore these gods will die.

If you are referring to the Creator (the Almighty God, Yahweh, Jehovah, the Father), then we are unaware of any scripture which states God died. God sent His son Jesus (Yehoshua), who became a man, so that Jesus could fulfill the law and lay his life down in sacrifice to pay the ransom price for father Adam's sin.  Jesus came to do his Father's will, not his own will. (John 5:30, “I can of mine own self do nothing: …. I seek not mine own will, but the will of the Father which hath sent me.”)  God is the head of Christ (1 Corinthians 11:3,  “… the head of every man is Christ; …. and the head of Christ is God.”)

How can Yahweh grant eternal life/immortality if He does not have it Himself?

1 Timothy 1:17  “Now unto the King eternal, immortal, invisible, the only wise God, be honor and glory for ever and ever. Amen.”

Titus 1:2, “In hope of eternal life, which God, that cannot lie, promised before the world began…”

1 Timothy 6:16, “Who only hath immortality, dwelling in the light which no man can approach unto; whom no man hath seen, nor can see: to whom be honor and power everlasting. Amen.”

The scriptures say God (Yahweh) is immortal (death-proof), therefore He can not die.  Due to Jesus' obedience, even to death on the cross, Yahweh granted Jesus immortality. But Jesus did not have immortality before his death on the cross.  He couldn't have had immortality. The same is true for the followers of Christ who are also promised immortality and to live and reign with Christ. (1Cor15:54, Rev 20:6)  However we must die in the flesh first.  We do not have immortality now, rather it is a reward for faithful obedience to God's will.

Therefore, we can not agree that God (Yahweh, Jehovah, the Father) died as that is impossible for a being who possesses immortality.  If you are asking why was it necessary for Jesus (Yehoshua, God's son) to die, that is an entirely different question, one we would be happy to answer if you wish.