Sent to Texas, he took command of an artillery battalion which he commanded at the battles of Palo Alto and Resaca de la Palma. He received a brevet to colonel for these two battles. At the battle of Monterrey, General William J. Worth placed Childs in charge of an attacking column composed of infantry and artillery. He successfully attacked the Bishop's Palace on the western end of the city. He transferred to Winfield Scott's army with the rest of the division and was Worth's chief-of-staff during the Siege of Veracruz. After the Battle of Cerro Gordo General Scott appointed Childs military governor of Jalapa and once Scott moved into the Valley of Mexico Childs was then appointed military governor of Puebla. He held this post during the battles for Mexico City. The day before Mexico City surrendered, Childs' garrison at Puebla came under siege. During the following siege of Puebla Childs repeatedly refused to surrender and was able to successfully repulse the Mexican attacks until a relief force under General Joseph Lane arrived and defeated the besiegers. For his defense of the city Childs was brevetted to brigadier general.