If I move out, do I lose my rights to the house?
No. Moving out of the marital home does not give up your ownership interest in it. Your claim to the house comes from how and when it was acquired, not from who is sleeping there while the divorce is pending.
This belief is widespread and it does real harm, because it keeps people in tense and sometimes unsafe households under the impression that leaving would cost them the property.
Where the idea comes from
It is a garbled version of something true. Moving out can affect other things, and people compress that into "you lose the house."
It can affect who uses the home during the case. Courts often prefer not to disturb an arrangement that is working, so the spouse living there may keep living there while things are pending. That is temporary possession, not ownership.
It can affect the parenting schedule, and this is the real concern. If you move out and the children stay, a routine forms in which they live primarily with the other parent. As months pass, that routine becomes the status quo a court is reluctant to disrupt. This is the genuine risk, and it is about the children rather than the building.
It can affect the practical arithmetic. Paying rent somewhere else while also paying the mortgage is a real strain, and it can weaken your position in a negotiation simply by making you tired and short of money.
None of those are forfeiting your interest in the property. They are reasons to plan the move rather than reasons not to make it.
If you are leaving and there are children
Do not leave the children behind by default. If you want substantial time with them, take steps to establish that from the start rather than planning to fix it later. A temporary schedule agreed in the first month is far easier to shape than one you are trying to change a year in, because temporary arrangements have a way of becoming permanent.
Agree the arrangement in writing, even informally, and keep to it.
Before you go
Take what you will need. Documents, financial records, personal property, anything with sentimental value. Getting back in later to retrieve things can become its own dispute.
Photograph the house and its contents. Boring, quick, and occasionally decisive when the furniture and belongings get divided.
Keep paying what you have been paying, at least until there is an order or an agreement. Stopping the mortgage to fund your new apartment can look like abandoning an obligation, and it damages your own credit besides.
Write down the date you moved out. In some states the separation date affects what counts as marital property and when clocks start, so it is worth recording even if nothing formal happens that day.
If it is not safe
None of the above should keep you in a home where you are not safe. If that is your situation, the property question is genuinely secondary and there are people whose job is to help you plan the timing. The safety resources page has the numbers, and they are free and confidential at any hour.
If you cannot leave yet, living together while you separate covers making one house work for two separating adults.
Whether moving out affects the separation date, temporary possession, or your custody position varies by state, and it is one of the areas where general answers are least reliable. Ask a licensed family-law attorney where you live before assuming the timing is neutral.