I'd argue it's more of a right-wing idea than a lowercase-l libertarian idea.
Libertarianism (left or right) argues for reducing coercion in society; right-libertarianism wants to focus on property rights as the basis of that liberty (even though we already know where that leads). Hence why they have this idea of creating closed-off separate societies based on property rights that can internally structure their economies how they wish.
The cruel irony of right-libertarianism (at least, the stateless-capitalist kind) is that it's not terribly difficult to imagine a sequence of events by which one could construct the same arrangement of coercive governments through property rights rather than conquest. In other words, the ancap argument against sovereign nations is that the US didn't get clean title to it's land, not that it's inherently illegitimate or coercive to have one person control the land that another lives upon. After all, what's the difference between a government charging taxes and a landlord charging rent?
Likewise, the only reason why we don't have competition between governments to provide services to citizens is because sovereign nations collectively decided to not play such games. If you want to switch governments, you need to make an immigration case for yourself to another government, which involves fitting into a small number of restrictive visa categories with yearly quotas on how many new migrants come in. You are not allowed to "just leave" without having somewhere to move to, which is where most of the restriction comes into play.
This is, again, not materially different from a landlord who refuses to provide housing to people who don't make a certain amount of money. Something that, again, is very much up right-wingers alley. Hell, you can do this the other way around, too - high housing costs are effectively a small-scale shadow immigration system. If I want to move to California, I have to be fantastically wealthy, while long-term residents have the advantage of rent control.