Yes, you should use the preposition "in" here.
However, there is also a very formal rule regarding prepositions that we really only follow when writing academically or in extremely formal situations.
One of the unspoken grammar rules of English is "never end a sentence with a preposition". However, almost nobody follows that rule in daily spoken English.
So, for EXTREMELY formal English, write this.
"In which state do you live?"
In normal, every-day English, just put the preposition at the end. We don't care about that formality.