connor joined the texas volunteers in may 1846 using the name "p. edward connor", serving as a first lieutenant in the texas foot riflemen during the mexican–american war. on july 7, 1846, at galveston, he was mustered into the united states army as a first lieutenant, enlisting for 12 months. his independent company of texas volunteers under the command of captain charles a. seefield was ordered to port lavaca on matagorda bay as a part of general john e. wool's army of the center, which was slated to invade mexico. marching through monclova, parras, and saltillo, the company, now under connor's command as a captain, and attached to the 2nd illinois volunteers under the command of colonel william h. bissel, fought in the battle of buena vista in february 1847. the company saw heavy action and connor was wounded in the hand; two of his lieutenants and 13 men were killed. connor was honorably discharged on may 24, 1847, near monterey, mexico, resigning due to rheumatism. when the california gold rush began, he crossed mexico from texas and arrived in california on january 22, 1850.