You may have to file in both states.
First determine when you switched from Michigan to Maryland. The switch of the drivers license shows that you made Maryland your new residence, but the date of the license isn't necessarily the date you switched residence. Other key events that show the change are registering to vote, and registering your car.
When picking the date you could use the day you left Michigan for the last time, or the date you arrived in Maryland.
Once you have that date everything before that is assigned to your old state, and everything on or after that date is assigned to your new state. By income that would include income from a job, but also any interest or dividends received. Both states should have a form and instructions on how to correctly file. The date will also be used to reduce any standard deductions or credits on your state taxes. Pay attention to the requirements regarding which forms need to be submitted. The states may require you submit a copy of the form for the other state.
Here is a clarification on the state version of the W-4
Lets assume:
- You make $3,000 a month. and you move to Maryland on August first.
- Your employer uses the Michigan W-4 until 31 August.
The January though the end of July (7 months) is Michigan income and the employer sends the state tax being withheld to Michigan.
During August the money that should have been assigned to Maryland will be sent to Michigan at the Michigan rate.
The income for September though December (4 months) will be assigned to Maryland and the withheld amount will be sent to Maryland.
That will mean that you will likely get a refund from Michigan and owe money to Maryland when you file in the Spring.
The date you switched the W-4 doesn't impact what you should pay each state. Getting it close to the correct date will minimize the miss-assignment of income tax withholding.