Sick and tired of all the rules the government makes you follow? And all those pesky taxes you have to pay? Well, good news! It turns out there was a tiny, some would say ridiculous, mistake made in the zoning laws or the surveyors somehow missed drawing your plot on the official maps. In any event, your house is actually not part of your country after all! You are your own sovereign nation now, my friend!
Of course, for the more pro-active protagonist, there's always good old-fashioned secession.
The new country is often an Egopolis with appropriately self-promoting flags, currencies, government titles and so on.
Expect a Snap Back or a Reset Button at the end of the episode, whatever the case.
Compare Property Line.
Dilbert: I don't remember voting on that. Dogbert: Here's your green card.
In one of Don Rosa's stories, "His Majesty, Mcduck", Scrooge McDuck finds an old copper plaque that makes the Money Bin hill its own kingdom. He declares independence to evade taxes, but it backfires when the scheming Akers Maccovet teams up with the Beagle Boys to invade and conquer "McDuckland".
The satirical Swedish radio series (and later TV, and books...) Mosebacke Monarki (inspired by Passport to Pimlico), in which a few blocks of Stockholm form their own kingdom. Generally used to poke fun at current Swedish affairs by having the "Mosebaskes" copy the bigger country but to absurd degrees.
Passport to Pimlico was inspired by a real incident. When the Nazis invaded Holland in May 1940, the Dutch royal family fled to Britain and Canada ... including Queen Wilhelmina's daughter, who was pregnant with a possible heir to the throne. Under Dutch law, only a person born on Dutch soil can succeed to the throne. A special act of the Canadian Parliament designated one room in a Canadian hospital officially part of the Netherlands, so that the Princess could give birth in her "native" country.
In G. K. Chesterton's The Napoleon of Notting Hill, not only does Notting Hill secede, it then proceeds to conquer the rest of the British Empire.
A running joke in Lake Wobegon Days involves how Lake Wobegon regards itself as part of Minnesota (and the United States) despite not officially being part of the state because of a cartographer's error when Minnesota was offically surveyed.
There's an episode of Mr. Show that centers around a man who demands that his cabin in the woods in Wyoming be recognized as a sovereign nation. The US government yields to his demand, setting a precedent that leads to the formation of countless other nations within Wyoming. Later, the man decides to emigrate to America, where he serves as a host for the Independent Nations Games featuring the leaders of all the other newly-formed countries.
In the TV movie Princess Debby, an American family from Illinois finds that they have inherited "Big Pine Island", a fictional island located in the middle of Lake Superior, from a long-forgotten eccentric millionaire uncle who just passed away after living like a hermit on the island for decades. After the family moves onto the island, the dad returns to the mainland (US side) in order to get mail service to the island going again, only to be told that the island is actually across the Canadian border. So he visits the Canadian side of the lake, only to be told that the island is US territory. Seems that both countries had been assuming all along that it belonged to the other, and thus it belonged to neither. This technically made the family rulers of their own sovereign territory (hence the title).
There's a house in Nevada that does this as a tourist gimmick and joke.
Under French law, all males born in France can be conscripted into the French army regardless of actual citizenship. The English parents of future author Somerset Maugham were living in France at the time of his birth; they made arrangements for Maugham's mother to give birth inside the British embassy in Paris so that Somerset Maugham was officially born in Britain and he was exempt from this law.
In a similar fashion Princess Margriet of the Netherlands was born while the royal family was in exile in Canada during World War II. Since Canada grants citizenship to anyone born on Canadian soil and dual citizenship is a bit of an issue for members of the royal family, the maternity ward of the hospital was declared extraterritorial and thus international territory.
At least one person born on an airplane has been declared a "Citizen of the Sky" by an airline; while they're not officially "foreigners" because they can receive their parents' citizenship and/or citizenship in the destination country (depending on why they were traveling), they receive traveling privileges. A baby being born on an airplane is a fairly rare circumstance, so of course there are urban legends that exaggerate the status into something like a micronation.
In one Family Guy episode, the town zoning map revealed that the Griffin's land was not even a part of the US. Thus was born the tiny, four-bedroom republic of Petoria (It would have been Peterland, but that was already the name of a gay club by the airport).
In the Sealab 2021 episode "Let 'Em Eat Corn", Capt. Shanks has Sealab declared a sovereign nation (to get out of paying income taxes), which sets off a wave of increasingly goofy sub-secessions amongst the crew. By the end of the cartoon, even Stormy's furniture and bathroom fixtures (which he claims are robots known as "Change-A-Trons" and "Plumb-bots") have declared their independence.
Episode 2 of Strong Bad's Cool Game for Attractive People starts with Strong Bad revolting against the King of Town's rule and making Strong Badia into an independent nation. The other main characters then proceed to form their own nations, which Strong Bad has to convince (or force) to join his side. Highlights include Bubs' neutral city-state of Concessionstantinople, the HomsarReservation, and Strong Mad's country of... Country.