Throughout the height of Egyptian civilization, Osiris was the primary deity. In power, he was second after his father, Ra, and was the leader of the gods on earth. He was the husband of Isis and the father of Horus (and a number of other gods in some stories). Osiris resided in the underworld as the lord of the dead, as after being killed by Set, even though he was a god, he could no longer dwell in the land of the living.
After Osiris was killed, Isis
resurrected him with the Ritual of Life, which was later given to the
Egyptians so that they could give eternal life to all their dead. The
spells and rituals cast by Isis, plus many others given to the people by
the gods over the centuries, were collected into The Book of Going
Forth by Day, colloquially known as The Book of the Dead.
In the underworld, Osiris sits on a great throne, where he is praised
by the souls of the just. All those who pass the tests of the
underworld become worthy to enter The Blessed Land, that part of the
underworld that is like the land of the living, but without sorrow or
pain. In some texts, in addition to the Judging of the Heart, Osiris passes final judgment over the dead, acting in this capacity as an Egyptian version of Radamanthus.
There is an interesting parallel between Osiris, a
fertility/agriculture god, and the Greek Persephone, an agriculture
goddess. Both end up in the underworld through treachery and both are
kept there by "legal loopholes" in the laws of the gods. Persephone
remains in the underworld for half a year because she tasted the food of
the dead. Osiris remains in the underworld because Ma'at dictates that the dead, even dead gods, may not return to the land of the living.