After the Civil War, Doubleday mustered out of the volunteer service on August 24, 1865, reverted to the rank of lieutenant colonel, and became the colonel of the 35th U.S. Infantry in September 1867. He was stationed in San Francisco from 1869 through 1871 and he took out a patent for the cable car railway that still runs there, receiving a charter for its operation, but signing away his rights when he was reassigned. In 1871 he commanded the 24th U.S. Infantry, an all African-American regiment with headquarters at Fort McKavett, Texas. He retired in 1873.