Can you file for bankruptcy in the United States if you live in Canada…or England…or Japan? The answer, at least in Maryland, is “Yes.”
With the increased mobility of people and the ease of transportation around the world, it is quite common for someone living outside the US to want or need to file for bankruptcy here. These "foreign bankruptcies" are different from those provided for in Chapter 15 of the Bankruptcy Code, which deals with cases that are started outside the US. Foreign bankruptcies usually involve a former US resident who incurs debt here, and then moves outside the US. Debt collectors now have a global reach; moving outside the US won't stop them from calling, writing, or collecting. And most countries' consumer protection laws are far weaker than those in the US.
In other words, there are good reasons for someone who doesn't live here to file for bankruptcy here.