Magilton won a appointment at the United States Military Academy in 1842 after a personal request from Alexander Dallas Bache himself before graduating in July 1846, ranking 16th at the Class of 1846. After graduation, he served in the Mexican–American War as a 2nd Lieutenant in the 4th US Artillery. Due to his participation at the battles of Contreras and Churubusco, he was promoted to Brevet First Lieutenant. He would gain another promotion to First Lieutenant for his service during the Third Seminole War. Magilton would then go on to be stationed at various places such as Leavenworth, Kansas from 1851 to 1852, then to the plains of New Mexico in 1853, then back to Leavenworth before being stationed at Fort Brady from 1853 to 1855. In 1856, he married Mary Lee whom he would have 2 children with.
