Sanborn commanded the first battalion of the First Illinois Volunteer Infantry in the Santiago campaign of the Spanish–American War. On December 22, 1898, he was made Major of the First Infantry Illinois National Guard. During the Mexican Border disturbances in 1916 Sanborn was colonel. In 1917, the First Illinois Infantry became the 131st Regiment, U.S. Infantry, and "answered the call to service in the war with Germany."