The largest permanent division within Shia Islam happened at the death of Musa's father, Jafar al-Sadiq, in 765, and it happened because the expected heir was already dead.
Ismail, Jafar's eldest son, had been widely understood to be designated, and he predeceased his father. What followed was not one dispute but several running at once. Some held that the designation could not be revoked and passed to Ismail's son Muhammad, and from that position the Ismaili tradition developed, later producing the Fatimid caliphate and, in time, the Nizari and Tayyibi communities. Others followed Musa, and that line, continuing through his descendants to the twelfth imam, is Twelver Shi'ism, today much the largest Shia body. Smaller groupings followed other sons, and one, the waqifiyya, held that Musa himself was the awaited mahdi and had not died at all.
The doctrinal issue underneath is what designation means. If the imamate passes by an explicit appointment that carries divine knowledge with it, an appointment cannot simply be corrected by events, and the alternative is to say that the appointment was never what people took it to be. Both branches had to answer that, and their answers are among the earliest sustained pieces of Shia theology.
The claim that Musa had not died was persistent enough that the circumstances of his death in custody in Baghdad in 799 were handled with the dispute in mind: reports describe the body being displayed publicly before burial specifically so that nobody could maintain he was still alive.