Judah received an appointment to the United States Military Academy, graduating 35th of 39 students in the Class of 1843. He was a classmate of Ulysses S. Grant. Commissioned as a second lieutenant in the U.S. 8th Infantry Regiment, he served on the frontier. He served with distinction during the Mexican–American War and was promoted to first lieutenant on September 26, 1847. He was commended for bravery during the storming of Monterrey, and again at the Battle of Molino del Rey and the Battle for Mexico City.