Here is the story of how Osiris became the god of the underworld:
Geb his father was the god of the earth, nut the sky goddess his mother,
They gave birth to Isis,nephtys,Osiris and Seth
Osiris married Isis and Seth married nephthys
Seth jealous of the first king osiris's power killed him.
Isis being a excellent magician, flapped her wings giving life to Osiris once again
They had a child named Horus.
Seth jealous of Osiris once again killed him this time cutting him up and scattering him in the Nile,
Isis and nephtys searched the Nile collecting osiris's body parts and fixing them back together hence the first mummification Osiris to stay alive departed to the underworld.
Remember Seth is not bad he was just jealous and wanted the throne
"to all good there shall be bad, to all bad there shall be good"- Robertus O. Black