During the Mexican–American War, he enlisted as a private in the 2nd Pennsylvania Infantry on December 29, 1846, and was mustered out of the volunteer service on May 6, 1847.
dˈʊɹɹɪŋ ðə mˈɛksɪkən ɐmˈɛɹɪkən wˈɔːɹ, hiː ɛnlˈɪstᵻd æz ɐ pɹˈaɪvət ɪnðə sˈɛkənd pˌɛnsɪlvˈeɪniə ˈɪnfəntɹi ˌɔn dᵻsˈɛmbɚ twˈɛnti nˈaɪn, wˈʌn θˈaʊzənd ˈeɪthˈʌndɹɪd fˈoːɹɾi sˈɪks, ænd wʌz mˈʌstɚd ˌaʊɾəv ðə vˌɑːləntˈɪɹ sˈɜːvɪs ˌɔn mˈeɪ sˈɪks, wˈʌn θˈaʊzənd ˈeɪthˈʌndɹɪd fˈoːɹɾi sˈɛvən.