Less than a month after reporting for duty, Shepherd sailed for France on June 17, 1917, as a member of the 5th Marine Regiment with the first elements of the American Expeditionary Forces (Army and Marine Corps troops), and arrived at Saint-Nazaire in western France on June 27. The 5th Marines became part of the 4th Marine Brigade, 2nd Division (2nd Infantry Division), when the division was organized on October 26 in France. The 2nd Division was placed under the command of Marine Corps Brigadier General Charles A. Doyen, who had been the 5th Marines commander. The 2nd Division trained with French Army veterans the winter of 1917–18.