The word "doughboy" was well known almost 100 years before World War I in Britain and America. Doughboy had a different meaning then. Soldiers in Spain, America, and Britain were all familiar with fried doughnuts called doughboys. Because of the occasional contact of the nation's armed force and transatlantic migration, it seems likely that this usage was known to the members of the U.S. Army by the early 19th century.
Though the first person to use the term is unclear, it was in use as early as the 1840s. One place that may have used "doughboy" first was during the Mexican–American War. Infantry forces, the army, were always covered with dust from marching through Mexico. This made the men look like uncooked dough. Another idea is the dusty infantry men looked like the mud bricks used in the area called adobes. Another idea is that doughboys were named this was because of their way of cooking field servings in the 1840s and 1850s when they baked doughy flour and rice mixtures in the ashes of a fire, but this does not explain why only army men had the doughboy name.