Afonso was the only son and heir of king John II of Portugal by his marriage with Eleanor of Viseu, princess of Portugal. The king was very fond of him and named the smaller islend of São Tomé and Príncipe after him (Príncipe meaning Prince in Portuguese language).
As a boy, Afonso was married to princess Isabella of Aragon, the oldest daughter of the catholic kings. Isabella I of Castile and Ferdinand II of Aragon had a male heir - Juan - but he was a feeble child and not expected to survive. Princess Isabella was thus the probable heiress to the joint throne of Castile and Aragon and, by being married to the heir of Portugal that meant a union of the Iberian kingdoms in Portuguese hands. The Spanish kings could not permit this to happen. They tried every diplomatic channel to have the wedding dissolved, without success, due to Portuguese influence with the Pope. Their cause was apparently lost, when an accident saved Aragon and Castile from annexation.
Afonso died from a horse fall in mysterious circumstances, during a ride in the Tagus. Murder was never proved but the catholic kings had everything to gain with his disapearence. Moreover, the prince's valet, an exiled Castilian boy, disapeared in the same day after being the only eye witness of the event.