A native of Vic-Fezensac in southwestern France, Castex studied at the Paris Institute of Political Studies and graduated in 1986. He later studied at the École nationale d'administration ("Victor Hugo" class of 1991).