He served in garrison at Savannah, Georgia as a second lieutenant of the Third Artillery until 1846, when he was appointed for recruiting service. He was promoted First lieutenant June 18, 1846, and took an active part in the Mexican–American War; he was present at Tampico and Vera Cruz. Beckwith was engaged in the Pacific Railroad Survey from 1853 to 1857 with John Williams Gunnison. Notably, the First Transcontinental Railroad followed his recommended route. His report, which also included an extensive survey of the Great Salt Lake, contained "much information on the plants, animals, climate, and geographical features of the lands he had explored". He succeeded Gunnison as leader of the survey after his death, and personally recommended the route for the railroad. He was also involved with constructing military roads in Nebraska and Kansas, between 1857–1859.