When America entered World War I, Hayward transferred himself into active duty in the national guard as a colonel of Infantry. As there were regiments available for him, he recruited, trained, and uniformed the 15th New York Infantry, an all-black volunteer regiment. The regiment was later nicknamed the Harlem Hellfighters. The regiment arrived in Europe in the spring of 1917. General Pershing, under whom Hayward served as a cadet, had the regiment fight with the French under the designation 369th Infantry Regiment. They fought in the front for 191 days, longer than any other American regiment, and participated in Champagne-Marne, Aisne-Marne, and Meuse-Argonne. Hayward was awarded the "Croix de Guerre" with gold palm and silver star and the Distinguished Service Medal, was commended by Marshal Foch and General Pershing, and was made an officer of the Legion of Honour thanks to the recommendation of General Petain. He was mustered out with the rest of the regiment in March 1919.