The usual way new nations are created is for a existing nations territory to declare independence, but was wondering if the opposite has ever happened? As if the US congress unilaterally recognized Texas as an independent nation, against the will of Texas?
The British did this a couple times that I'm familiar with, one of which was more of an abandonment than the other. The first was the "Unilateral Declaration of Egyptian Independence" in 1922, which is basically what it says on the tin with the enormous caveat that the British did not grant the Egyptians control over their foreign policy/defense or control of the Suez Canal. The extent to which Britain still controlled the country would be demonstrated during WWII, and particularly in the Abdeen Palace incident where the British military basically threatened to mount a coup if King Farouk didn't play ball. The Free Officers revolution in '52 and seizure of the Canal in '56 were seen as anti-colonial revolts as much as domestic revolutions.
The clearer cut example where the colony didn't really want independence was the case of the Trucial States (i.e. con temporary Qatar, Bahrain, and the United Arab Emirates.) These states relied on a British defense guarantee to secure their territorial integrity from Saudi Arabia, Iran, and each other and did not necessarily want independence without that guarantee. But in 1968 British PM Harold Macmillan declared that Britain was coming back from "east of Suez" and would no longer uphold this presence. These states then had to scramble to come up with new structures that would secure their interests without that British umbrella of protection (e.g. The founding of the UAE, agreements of sovereignty with Iran, which were subsequently broken).