Cooke then volunteered for the Matamoros expedition of 1835–36. As captain he led the reformed San Antonio Greys to Goliad. Shortly after Sam Houston's arrival and impassioned speech there, Cooke offered his services to the Texas army and was sent with his company to Refugio, where they were joined by Col. James Walker Fannin, Jr., and the Georgia Battalion. Fannin ordered Cooke to San Patricio to reinforce Maj. Robert C. Morris. Cooke was subsequently left in command there when Morris, Johnson, and Col. William Grant proceeded to the Rio Grande.
Cooke received Grant's letter stating his intentions to join the Mexican Federalists and, after relaying this news to Fannin, was ordered to fall back to Goliad, where he arrived on February 12, 1836. He was then sent with two Mexican prisoners to Washington-on-the-Brazos, where he joined Houston's staff as assistant inspector general. Cooke went with Houston to Gonzales and there assisted in organizing the troops. At the battle of San Jacinto he served on Houston's staff with the rank of major. Cooke was in charge of the guard on the prisoners when Antonio López de Santa Anna was captured. He prevented the angry Texans from executing Santa Anna so that he could be brought before General Houston.
When Houston went to New Orleans to recover from wounds received in the battle, Cooke accompanied him, but soon returned to Texas to serve as chief clerk of the War Department. In October 1836 he was appointed stock commissioner in Houston's first administration and was responsible for issuing stock certificates and certificates to fund the public debt. He served in this office until the spring of 1839. In November 1836 Houston appointed Cooke acting secretary of war and on January 31, 1837, inspector general, an office he held until July 31, 1837. Cooke then retired from the army because of ill health and opened two drugstores in Houston. On June 9, 1837, he was made official signer of the president's name to promissory notes of the Republic of Texas, a job necessitated by injuries to Houston's arm that were aggravated by illness. The position lasted until November 11, 1839.
Cooke reenlisted in the army around October 1838 and received a commission as quartermaster general of the republic. In March 1840 Mirabeau B. Lamar named him commissioner to sign treaties with the Comanches, and in this role he took part in the Council House Fight in San Antonio on March 19, 1840.
On August 18, 1840, Cooke was appointed colonel of the First Regiment of Infantry, the unit that laid out the Military Road from the Little River to the Red River. Fighting Indians and starvation along the way, Cooke explored and mapped much of north central Texas. He established Fort Johnson and Fort Preston on the Red River and Cedar Springs Post on the Trinity River; at this post were the first structures built by white men at the future site of Dallas. Cooke's success in this venture prompted a grand military ball in his honor, held in the Senate chamber at Austin on February 27, 1841, and a nomination for vice president of the republic. He declined the latter and accepted instead an appointment from Lamar in April 1841 as senior commissioner on the Texan Santa Fe expedition.
Cooke assisted Lamar in promoting and organizing the expedition and was to have been the chief civil authority in Santa Fe. On September 17, 1841, he was deceived by the traitor Capt. William G. Lewis and surrendered the Texans' arms. Cooke and his men were marched to Mexico City and imprisoned in Santiago Prison on December 26, 1841. They were released on June 14, 1842, and stayed at Waddy Thompson's house in Mexico City and then in Jalapa, Vera Cruz, until passage could be arranged. Cooke arrived at Galveston aboard the United States brig Boxer on August 10, 1842.
Ignoring his pledge not to take arms against Mexico under pain of death, he immediately joined with Gen. Edward Burleson to expel the Mexican general Adrián Woll from San Antonio. On September 22, 1842, Cooke was wounded in Capt. John C. Hays's charge on the cannon at Arroyo Hondo. On October 25, 1842, Houston appointed him quartermaster general and chief of the subsistence department, in which capacity Cooke helped organize the infamous Snively expedition and the Somervell expedition, of which he was a member until February 1, 1843.
Seeking further revenge, Cooke went to New Orleans to join Edwin Ward Moore on his expedition to the Yucatán. They sailed on April 15, 1843, in the sloop-of-war Austin. Cooke participated in engagements with the Mexican steamships Montezuma and Guadaloupe, and after the Independencia joined the Texan fleet, he twice accompanied her on raiding expeditions, hoping to capture prisoners to exchange for those held in Mexican prisons. The first expedition resulted in the capture of the Mexican ship Glide, and the second brought back news to Moore that Houston had declared him a pirate, charges against which Cooke later defended him. They returned to Galveston on July 14, 1843, and Cooke received an appointment from Gen. Sidney Sherman as adjutant general of the Texas militia.
Cooke was elected representative from Bexar County to the House of the Ninth Congress on September 2, 1844, and served his term as chairman of the Committee on Military Affairs. Partly as a result of his efforts on Commodore Moore's behalf, Cooke was appointed by President Anson Jones in December 1844 to replace Morgan Calvin Hamilton as secretary of war. Cooke, who had become the last commander of the regular Texas army when the troops were disbanded in 1841, was now responsible for raising troops and supplies for the United States army of occupation under Gen. Zachary Taylor. He served in this office until the spring of 1846, when he ran unsuccessfully for the Congress of the United States. He lost to Timothy Pillsbury by a narrow margin. On April 27, 1846, Cooke was appointed the first adjutant general of the state of Texas by Governor James Pinckney Henderson. He served in this office until his death.
Cooke was a Protestant and a grand royal arch captain of Holland Masonic Lodge No. 36 in Houston. On August 16, 1844, he married Ángela María de Jesús Blasa Navarro, daughter of Luciano Navarro and niece of José Antonio Navarro. They had one son. Cooke died of tuberculosis on December 24, 1847, at his father-in-law's ranch in Seguin. He was buried in nearby Geronimo and, on March 2, 1937, reinterred in the State Cemetery, Austin. Cooke's Camp, near San Antonio, Cooke County, and Cooke Avenue in San Antonio were named for him.
30° 15.920, -097° 43.641
Texas State Cemetery