Ana was born into the House of Borja (Italian: Borgia). She was a distant relative of Francisco de Borja y Aragón, poet and viceroy of Peru from 1615 to 1621, and, like him, descended from Saint Francis Borgia.
She was the daughter of Francisco Diego Pascual de Borja y Aragón y Centelles, 8th duque de Gandía, and of Artemisa María Ana Teresa Gertrudis, princesa de Doria de Melfi. Her elder sister Magdalena was the wife of Philippe François, 1st Duke of Arenberg.
Her second marriage, on July 20, 1664, was to her cousin, Pedro Antonio Fernández de Castro Andrade y Portugal, 8th conde de Villalba, 10th conde de Lemos, 7th marqués de Sarria. By this marriage she became the condesa (countess) de Lemos. Her husband was named viceroy of Peru on June 12, 1667, under the authority of Mariana of Austria, regent for her son Charles II of Spain.
The Count and Countess of Lemos arrived in Peru at the port of Callao on November 9, 1667. They were received by the Spanish of the colony with much pomp. The viceroy took possession of his office on November 21, 1667.
On June 7, 1668, Viceroy Pedro Antonio Fernández de Castro sailed from Callao for Islay, Arequipa and Puno, leaving his wife in charge of the government of Peru, as gobernadora (female governor). This was an official appointment. The royal decree by which the count held the position of viceroy provided that in his absence from the capital, the government would be entrusted to his wife. She was not a figurehead; she exercised real authority and ran the business of the colony during her husband's absence, making decisions and issuing decrees. Her authority was recognized by the Audiencia of Lima. She met with them and other officials on July 5, 1668.
News of the July 11, 1668, attack on Portobelo, Panama, by the English pirate Henry Morgan arrived in Lima on the following August 31. In response, Countess Lemos sent supplies and military equipment in aid of the defenders and readied the colonial navy to guard against pirates off the Peruvian coast. Pirates did attack the port of Callao during her period in office.
The viceroy returned and resumed his office on November 12, 1668. The countess had been governor of Peru for five months and five days.
She had two children before leaving Spain, and three children in Lima. By virtue of the different locations of birth, the first two were Peninsulares and the later three were Criollos. Her fourth child, Rosa Francisca, was born September 18, 1669, and named for Blessed Rose of Lima.
The countess had much influence in the Court of Spain, and because of that, with the papacy. She continued the work of her uncle, Viceroy Francisco de Borja y Aragón, to achieve the beatification and canonization of St. Rose. Beatification was conferred on February 12, 1668. The official celebration was held on April 15 of that year, in the Basilica of San Pedro, and the official communication arrived in Lima on January 18, 1669.
The count and countess sent a sculpture of St. Rose to the Vatican. Melchiorre Cafà was the sculptor. On the occasion of her beatification, her wooden coffin was replaced by one of silver, at the expense of the countess. At the request of Spanish regent Mariana of Austria, on August 11, 1670, Rose was named patron of the Spanish possessions in the Americas and the Philippines. She and Francis Borgia were canonized on April 12, 1671, by Pope Clement X. Rose was the first native-born American to become a Catholic saint.
Viceroy Count Lemos died December 6, 1672. The countess and her children left Peru on June 11, 1675. She died in 1706.Mugaburu, Josephe and Francisco, Journal of Lima (1640–1694). Printing C. Vasquez, 1935.