On June 16, 1918, Debs made a speech urging resistance to the military draft of WWI. He was arrested and charged with ten counts of sedition and sentenced to ten years in prison. Debs presented what has been called his best-remembered statement at his sentencing hearing:
- Your Honor, years ago I recognized my kinship with all living beings, and I made up my mind that I was not one bit better than the meanest on earth. I said then, and I say now, that while there is a lower class, I am in it, and while there is a criminal element, I am of it, and while there is a soul in prison, I am not free.
Debs ran for president in the 1920 election while in prison. He received 919,799, write-in votes (3.4%). During his time in prison he wrote a series of columns deeply critical of the prison system. They appeared in sanitized form in the Bell Syndicate and were published in his only book, Walls and Bars, published posthumously.