 He was the son of Francisco Fernández de Castro, 9th Count of Lemos, and Antonia Téllez-Giron y Enriquez de Ribera.He married in Madrid, on 20 July 1664 Ana Francisca de Borja, daughter of the 8th Duke of Gandia, a wealthy widow since 1663 who had been the third wife of Enrique Pimentel.Fernández de Castro was educated for the army.