Vasudeva was the son of King Shurasena of Mathura and husband of both Rohini and Devaki. His sister, Kunti, was married to King Pandu of Hastinapura, making Vasudeva uncle to the Pandavas. His brother-in-law, King Kansa of Mathura, imprisoned him with Devaki due to a prophecy stating their eighth child would kill the king.
After six children were killed, the seventh was transported to the womb of Rohini, disguised as Devaki's miscarriage. Their eighth child, who would grow to be Krishna, was smuggled to a local family of cowherds, where he grew up.
After Krishna fulfilled the prophecy, Ugrasena, formerly imprisoned father of Kansa (and former king), was restored to the throne and Vasudeva became the heir.