This is a question I am asked a whole lot more than you would think. We have a lot of clients who live along the US border, in either Canada or Mexico, who have TN visas and cross the border every day to work in the US.
They are always surprised to learn when we start talking about getting green cards based on their jobs that they have to move to the US to get a green card. Many of them are tired of the uncertainty of renewing their TN’s every few years, and would like to get a green card so that they do not have to worry about this issue any longer, and to make the travel across the border more convenient. However, they do not necessarily want to move to the US.
The purpose of Permanent Resident status is for the applicant to establish a residence in the US. Permanent Resident status is not available to people who do not live in here. If you get a green card and continue to live in Canada or Mexico, eventually you are going to get into trouble and face the possibility of having your green card taken away on the grounds you are not permanently residing in the US. This is also true for any other country in the world, not just Canada and Mexico.
Interestingly, there is nothing wrong with living in the US and crossing the border to work in Canada or Mexico every day. You just cannot do it the other way around. The key is that you are residing in the US. That means living, sleeping at night, having a house or apartment, getting a driver’s license, paying taxes, and otherwise doing all of the things in the US that people who have established a residence here do. You can’t just bop in to work each day and then leave at night.
Finally, you do not have to move to the US until your green card is finally approved if you are processing through a US consulate abroad. You do have to be here if you are already in the US on a work visa and you are going to complete the final step of your green card process by filing an Application to Adjust Status. You cannot do that without already having established a residence here.