Does car insurance and registration have to be in the same state?
The car must be registered in the state where you live or in the state where your official residence is listed. The only time this is not allowed is when a college student is studying in another state. Thus, you should register your car and car insurance in the state where you work, go to school (except for the above-mentioned exception), are registered to vote, where you pay rent or property tax, or your permanent assignment if you work in the military.
If you buy a second hand car that is registered in another state, you should have the ownership transferred to your name. This protects you from any case involving the previous owner and ties up all loose ends regarding the car. You also cannot register and insure the car in another state just because the rates are cheaper there.