A Minnesota native and 1904 graduate of the United States Military Academy, McNair was a Field Artillery officer with a background in the Ordnance Department. A veteran of the Veracruz occupation and Pancho Villa Expedition, during World War I he served as assistant chief of staff for training with the 1st Division, and then chief of artillery training on the staff at the American Expeditionary Forces headquarters. His outstanding performance resulted in his promotion to temporary brigadier general; at age 35, he was the Army's youngest general officer.