In 1745, having finished their scientific labours, Ulloa and Jorge Juan prepared to return to Spain, agreeing to travel on different ships in order to minimize the danger of losing their important samples and records.  The ship upon which Ulloa was travelling was captured by the British Royal Navy, and he was taken to England as a prisoner of war. In Britain, however, Ulloa was soon befriended by leading men of science.  He was elected as a Fellow of the Royal Society of London in December 1746.  Thanks in part to the intervention of Martin Folkes, the President of the Royal Society, Ulloa was released from custody and allowed to return to Spain.
In 1749, Ulloa published his Relación histórica del viaje a la América Meridional (Madrid, 1748), which contains a full, accurate, and clear description of the greater part of South America geographically, and of its inhabitants and natural history. It was translated into English and published in 1758 as A Voyage to South America (1758).
Shortly after their return to Spain, Juan and Ulloa penned a confidential report to their political patron, the Marquess of Ensenada, on the state of the defenses and administration of the Spanish domains in South America.  The document is highly critical of the corruption of both the civil authorities and the Catholic clergy, including their exploitation of the Native American population.  That report remained unpublished during the lifetimes of its authors.  It only became public in 1826, after the independence of South America from Spain, when it was published in London by an Englishman named David Barry.
Ulloa gained an international scientific reputation and he was appointed to serve on various important scientific commissions. With Jorge Juan, he is credited with the establishment of the first museum of natural history, the first metallurgical laboratory in Spain, and the astronomical observatory of Cádiz. In 1751, Ulloa was elected as a foreign member of the Royal Swedish Academy of Sciences.