The 4th could've been chosen as the succesor or favorite before he got the title. They also showed that he ran away after being discovered doing his experiments by the 3rd. Either way, it was before the 4th died and Naruto was born.