Hollywood and some history books get this one wrong. The first Indian code talkers to serve the American military were not the Navajo Marines of World War II, but Choctaw Nation soldiers in the First World War.
During World War I, Choctaw soldiers were organized into Company E of the 142nd Infantry, part of the Texas and Oklahoma National Guards' 36th Division. That division's big moment in the Great War came when it was called upon to relieve the Marines and Doughboys of the 2nd U.S. Division in the brutal Battle of Blanc Ridge in the Champagne in October 1918.
Upon occupying trenches formerly held by the Germans near the village of St. Etienne, American troops discovered telephone lines left intact by the enemy. Colonel A.W. Blair, commander of the 142nd Infantry, deduced that the Germans had intentionally left the lines in order to bait the Americans into using them. He reasoned that the enemy troops would be able to tap into their former communication network and, thereby access any messages the Americans might send. With no time to spare for laying new lines, Blair chose to take advantage of the communications system the Germans had left behind but with a "code" in place he felt the enemy couldn't possibly break. By using Choctaw members of Company E to transmit messages in their traditional language, with at least one Choctaw placed in each field company headquarters, the tactic was a complete success.
It’s reported that a captured German officer later confessed that his intelligence personnel were completely confused by the Choctaw language and were unable to de-code any American messages they intercepted. The U.S. Army and Marine Corps remembered the lesson for future wars.