After graduating from West Point as a second lieutenant in the Class of 1842, he served in the Mexican–American War, building fortifications to protect American supply lines in the advance on Mexico City.
After the completion of the Smithsonian in 1855, he traveled to New England, where he supervised the rebuilding of the Minot's Ledge Lighthouse, a project widely considered to be one of the most difficult to be attempted by the U.S. Government up to that time.
In later years, he persuaded the U.S. government to acquire Pearl Harbor from the Kingdom of Hawaii and supervised numerous irrigation and land reclamation projects in California's central valley.
Between 1843 and 1848, he worked on several fortification projects along the East Coast of the United States, including Forts Pulaski, Jackson, and the defenses of New York City.
[2] In 1848, he participated in the Mexican–American War as a second lieutenant of engineers, helping build defenses to protect American supply lines as Winfield Scott's army advanced on Mexico City.
After the conclusion of the war, now-First Lieutenant Alexander returned to West Point for a four-year assignment as Treasurer and Superintending Engineer for the Cadets' Barracks and Mess Hall.
[6] To support the large lecture hall and the central core of the building, Alexander arranged for the installation of fireproof masonry-encased iron structural columns.
[7] Following his work on the Smithsonian, but before the Scott Building finished construction, Alexander traveled to New England, where he was assigned to a project at the entrance of Boston harbor.
[8] Designed by Brigadier General Joseph Totten, head of the U.S. Army Corps of Engineers, the lighthouse was intended to replace a structure that had been destroyed in an 1851 storm.
[9] Appointed superintendent of the lighthouse construction in April 1855, newly promoted Captain Alexander modified Totten's design in accordance with conditions at the site.
In the haste to meet the Confederates in battle, Alexander found himself serving as an infantry officer and was assigned to the 1st Division of the Army of Northeastern Virginia, under the command of Brig.
Throughout the remainder of 1861, the newly named Army of the Potomac, under the direction of its new commander, Maj. Gen. George B. McClellan, expanded and improved the improvised defenses that had been built in the seven weeks between the occupation of Northern Virginia and the Battle of Bull Run.
[16] Alexander continued in this role during the Engineering Brigade's deployment with the Army of the Potomac during the Peninsula Campaign, several times performing ably under hostile fire.
[14] Following the abandonment of the campaign and the return of the Army of the Potomac to northern Virginia, General Barnard, now chief engineer of defenses of Washington, D.C., requested Alexander serve as his aide-de-camp.
[18] In August 1863, as part of his duties as aide-de-camp to General Barnard, Alexander was named as a member of a board of military officers who would examine the defenses of Washington and suggest improvements as needed.
The appointment was largely a caretaker role, as the final number of guns and forts had been established by the 1863 commission, and the Union Army's success in the field meant that no major force could threaten Washington.
Following the conclusion of the war, Alexander presided over the drawdown in U.S. Army forces in Washington and the gradual decommissioning of the forts surrounding the city.
[22] Alexander, not wishing to see Washington return to its defenseless pre-war state, recommended that some forts be continually maintained in order to preserve them for future needs.
[23] The recommendations were accepted, but Alexander's ability to follow through on them was limited by an August order to "not incur expenses for hired labor" and the inability of the chief engineer of the District of Washington to furnish the large numbers of enlisted men needed to continue the upkeep.
[27] Following his closure of the offices of the defenses of Washington, D.C., he was briefly ordered to New England, where he supervised the renovation of various minor fortifications and river improvements in Maine.
As part of the treaty, Hawaii ceded the area of Pearl Harbor to the United States in return for trade agreements benefiting Hawaiian sugar planters.