He then served in a variety of places, including Hudson, Concord, Warren, Consort, Falmouth, the Pacific Ocean, Delaware and Brazil until 1843.
[2] During the Mexican–American War, Stanly was assigned to the Pacific Squadron and participated in the capture of California and the defense of San Francisco.
[3] After the start of the American Civil War, Stanly was commissioned as commander on May 19, 1861, and served on the steamer Narragansett.
[1][3] At that time, he was given command of the side-wheel steamer State of Georgia and cruised off the coast of South Carolina, including participating in the expedition of Bull's Run.
[2][7] He was buried at Oak Hill Cemetery in Washington, D.C.[7][8] In 1941, the destroyer USS Stanly (DD-478) was named in his honor.