On the outbreak of the First World War Castelnau took command of the French Second Army. In 1914 he led the failed invasion of Lorraine but was more successful in defending French positions at the Marne. A strong supporter of offensive warfare, Castelnau led the attack on the German lines at Albert in September, 1914. .
Castelnau supervised the defence of Verdun in 1916 and successfully opposed plans to withdraw from this part of the Western Front. When Robert Nivelle replaced Joseph Joffre in December, 1916, Castlenau retired from active service.