He commanded the Ninth Infantry Brigade in all its operations as a part of the Fifth Division, American Expeditionary Forces (AEF) during the final months of World War I.
While a major, he was Adjutant General of the District of Columbia Army National Guard, which he developed to a high state of efficiency.
As colonel of the Thirty-eighth Infantry, he instilled that fighting spirit which won for his regiment fame as the "Rock of the Marne.
In the first phase of the Meuse-Argonne Offensive, his Brigade captured Cunel and drove the enemy from the Bois-de-la-Pultiere and the northwestern Bois-de-Foret.
In the second phase of the Meuse-Argonne Offensive, Castner's brigade captured Aincreville, Clery-le-Grand, Clery-le-Petit, Bois de Babiemont, the Punchbowl, and Doulcon.
While in Command of the 9th Infantry Brigade, General Castner displayed conspicuous tenacity of purpose and a determination to overcome all obstacles.
At the Bois des Rappes in the St. Mihiel salient and ensuing actions, his brigade effectively routed the enemy.