In October 1836 Gray was selected to be one of the botanists on the United States Exploring Expedition (1838–1842), also known as the "Wilkes Expedition", which was supposed to last three years. Gray began getting paid well for his work preparing and planning for this expedition, even to the point of loading supplies onto a ship in New York harbor. However, the expedition was fraught with politics, bickering, turmoil, inefficiency, and delays. Referring to the Secretary of the Navy, Mahlon Dickerson, Gray wrote of "abominable management & stupidity". Despite this, Gray resigned from the Lyceum in April 1837 to devote his time to the preparations. By 1838 the expedition was in utter turmoil. The new state of Michigan was starting its university, and Gray applied for a professorship in early 1838. He resigned from the Wilkes Expedition on July 10, 1838. In 1848 Gray was hired to work on the botanical specimens, and published the first volume of the report on botany in 1854, but Wilkes was unable to secure the funding for the second volume.