Bankhead served in the Mexican–American War, at Vera Cruz commanding the 2nd Artillery Regiment and was promoted to brevet Brigadier General for distinguished service in the reduction of Vera Cruz where Bankhead, the senior field officer, acted as chief of artillery, in command of the batteries. From January 1848 he commanded the Department of Orizaba, Mexico.