Ulloa entered the navy in 1733. In 1735 he was appointed with fellow Spaniard Jorge Juan a member of the French Geodesic Mission, a scientific expedition which the French Academy of Sciences was sending to Peru to measure a degree of the meridian at the equator, led by Pierre Bouguer.
He remained there from 1736 to 1744, during which time the two Spaniards discovered the element platinum. 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 the important fruits of their labours.
The ship upon which Ulloa was travelling was captured by the British, and he was taken as a prisoner to England. In that country, through his scientific attainments, he gained the friendship of the men of science, and was made a Fellow of the Royal Society of London. In a short time, through the influence of the president of this society, he was released and was able to return to Spain. He published an account of the people and the countries they have met (1748), which was translated into English as A Voyage to South America.
He became prominent as a scientist and was appointed to serve on various important scientific commissions. He is to be credited with the establishment of the first museum of natural history, the first metallurgical laboratory in Spain, and the observatory of Cadiz.
He arrived on March 5, 1766 in New Orleans to serve as the first Spanish governor of West Louisiana. The French colonists refused to recognize Spanish rule, and de Ulloa was expelled from Louisiana by a Creole uprising in 1768.
For the remainder of his life he served as a naval officer. In 1779 he became lieutenant-general of the naval forces.
As a result of his scientific work in Peru, he published (Madrid, 1784) Relación histórica del viaje á la América Meridional, which contains a full, accurate, and clear description of the greater part of South America geographically, and of its inhabitants and natural history. In collaboration with the Jorge Juan mentioned above, he also wrote Noticias secretas de América, giving valuable information regarding the early religious orders in Spanish America. This work was published by David Barry in London, 1826.
His name is also recalled as the meteorological term Ulloa's halo (also known as Bouguer's halo) which an observer may see infrequently in fog when sun breaks through (for example, on a mountain) and looks down-sun — effectively a "fog-bow" (as opposed to a "rain-bow"). A fog-bow is defined as "an infrequently observed meteorological phenomenon; a faint white, circular arc or complete ring of light that has a radius of 39 degrees and is centered on the antisolar point. When observed, it is usually in the form of a separate outer ring around an anticorona." (Tricker, R. A. R., 1970: An Introduction to Meteorological Optics, pages 192–193).
Ulloa died at Isla de Leon, Cádiz, in 1795.