Migrants spawn from nothing.
Population cap is the only way
You're actually wrong here. Migrants may spawn from nothing, but they won't spawn if there are
NO dwarves in the world (40d).
My guide to getting rid of immigrants (or civs in general).
1) Modify the dwarf (MOUNTAIN) entity definition in the raws to contain the following (replace the existing lines with these):
[MAX_STARTING_CIV_NUMBER:1]
[START_GROUP_NUMBER:1]
[MAX_POP_NUMBER:1]
[MAX_SITE_POP_NUMBER:1]
2) Delete the contents of your data/objects directory (good idea if you're messing with raws).
3) Generate a new world. Note that the end year should be at least 150 (to increase chances worldgen dwarves are dead - old age).
4) Export the world population data.
5) Open population data and verify there are no dwarves in the world (search for "dwar"). If you find any, regenerate the world (the dwarves very, very rarely survive with the above entity settings - it's good to verify though).
6) Embark as the only dwarven civ listed, happy in the knowledge that you'll never get any migrants (
tested) - you get 'fortress has attracted no migrants this season' message every time. Nor will you get a Dwarven caravan (
tested). Potentially won't get nobles either (
not tested - need verification). I'd recommend embarking with an anvil and checking you have at least one male and female dwarf (gender balance on embark seems random) if you want to play as a dead civ.
CAVEAT: If you abandon and re-embark or reclaim, dwarves will exist in the world and you'll get migrants!
I did try to quickly test the 'dead dwarven civ + nobles' thing, but I'm pretty sure my test was flawed (I was embarking with >7 dwarves). Maybe increase the littersize of dwarves to several hundred maybe... it would be good if the 'no nobles' thing could be verified by someone. Also need to test HFS king w/ dead civ - it would be awesome to be able to create a mountainhome from nothing.