Alonso Fernández de Córdoba y Aguilar was born in Montilla on 21 September 1653. He was the son of Luis Fernández de Córdoba y Enríquez de Ribera, 5th Duke of Feria, and his wife Mariana Fernández de Córdoba. His older brother Luis Fernández de Córdoba succeeded his father as 6th Duke of Feria. He was educated at the University of Salamanca.
In the consistory of July 1697, Pope Innocent XII named him a cardinal, although he ultimately never traveled to Rome to receive the galero. He was appointed Grand Inquisitor of Spain on 5 September 1699 but died before he could assume this office.