 John was the son of Ubaldo I Visconti and cousin of Ubaldo of Gallura.When the latter Ubaldo drew up a will in January 1237 at Silki, John was nominated to succeed him.However, Enzo, the husband of his Ubaldo's widow Adelasia of Torres, seems to have taken control of both Gallura and Logudoro and was granted the title King of Sardinia by his father, the Emperor Frederick II.