At that time, his father was imprisoned in the fortress of Wiener Neustadt (south of Vienna) on accusations of correspondence with France for support of the cause of Hungarian independence.
When Francis II Rákóczi managed to escape from prison and fled to Poland, his two sons, Joseph and George, stayed in Vienna and were raised as members of the German nobility, loyal to the Holy Roman Emperor.
After receiving the title, Joseph Rákóczi escaped from Vienna and traveled to Rome, Naples, Paris and Madrid.
After the death of Francis II Rákóczi, Joseph came to Rodosto at the invitation of his father’s fellows in exile as the rightful heir.
In the summer of 1737, a war broke out between Austria and the Ottoman Empire, and the Sultan recognized Joseph as the candidate for Prince of Transylvania.