In 1871, President Ulysses S. Grant appointed Wells associate justice of the territorial supreme court to fill out the term of Christian S. Eyster, who had resigned, and he served for four years until 1875.