If you want to file in Montgomery County, and cannot afford an attorney, your best bet is to go to the Courthouse at 50 Maryland Avenue and stop at the domestic self-help office on the second floor. I frequently volunteer there and everybody there is well qualified to give you a brief advice and provide paperwork you need.
You can file in Maryland if one of the spouses has been living continuously in Maryland for more than one year at the time you file. Of you want an uncontested divorce, you must also have been livign spearate and aprt for more than one year when you file.
You can file in Maryland if you have lived there for more than one year prior to filing for divorce OR prior to that time period if the grounds for divorce occurred in the state of Maryland. For example, you moved to Maryland with your spouse and then your spouse deserted you, or committed adultery, etc. You can look at the following website: http://www.montgomerycountymd.gov/ciatmpl.asp?url=/content/circuitcourt/index.asp.
A weekly guide with tips and legal advice for each stage of the process.