That sounds a lot like the episode "The Ghostly Rival" from 1975. A genie enables a young "beach bum" to take over the body of a rich rival in order to marry the woman of his dreams-- only when she becomes pregnant-- does he realize he's made a pact with the devil and tries to kill his wife, unborn child and himself in a car crash. Antoher couple of "Genie" tales that come to mind are-- the "Imp in the Bottle" and (in it's own way) "The Dice of Doom".

Until next time.