The story of salmon begins with a death, as a "hen", exhausted from a swim upriver that might have lasted weeks and covered hundreds of miles, her scales discoloured, her body shrunk, lays tens of thousands of eggs in a series of beds. When some equally knackered males have fertilised the eggs, she covers them with silt and gravel, and guards them until she, like the fathers, dies.

Soon the eggs begin to hatch. At first the fish are alevin, tiny, wriggling wormy things, then they camouflage themselves with stripes, at which time they're called parr. After some months or years they grow into smolts and swim downstream towards the brackish waters where the river mingles with the sea. Slowly the fishes' bodies adjust to the strange salinity, until at last they head out into the ocean, and disappear.

Years later, the salmon return. They will have travelled thousands of miles across the ocean, in the case of some Atlantic salmon feeding in the cold waters off the west coast of Greenland. But every salmon which survives to spawn does so in the same river where it was born. Humans have long been fascinated by this, and the process is still poorly understood. Some say that the fish find their streams using the earth's magnetic pull, or that the salmon's sense of smell is so keen it can recognise things in the water undetectable to humans.

However they do it, they return fat and fed – and at their most delicious – and gradually begin to swim upstream. Effectively they starve themselves, their stomachs collapsing as they travel inland, with no respite from the currents, thrashing their way through a gauntlet of pollution, dams and predators. The males' jaws warp and deform, which seems to make them more attractive to females, and their skin changes colour. When at last they reach the place they hatched, they lay their eggs and milt them, and then, with almost no exceptions, they die. Even without the obstacles that humanity places before the salmon, fewer than one in 1,000 fish make the full journey home.

All salmon live in the northern hemisphere: any "salmon" they serve you in Melbourne or Cape Town will be an import or another species altogether. The Pacific retains around a dozen species of the fish, of varying quality. The silver or coho salmon of western Canada is delicious. The most common Pacific species, the prosaically named and lavishly ugly dog salmon, is fine for tins.

Just one embattled species exists in the Atlantic, Salmo salar. The finest of all the salmon, it once ranged from the coasts of southern Portugal north as far as Norway, beyond Greenland and south to the Hudson River. It was the major fish of the European middle ages, roasted and braised, poached, pâtéd and potted, salted and smoked.

Native Americans living near the Atlantic coast would split the fish and roast them on barbecues. But today, hardly any Atlantic salmon remain. Its numbers have declined 80% since the early 1980s, when they were already grossly depleted from their former levels. The fish is now on Greenpeace's ignoble "red list" of severely threatened species.

But we eat it all the time, of course. Britons now tuck into 1m salmon meals every day. Globally, the farmed salmon industry was worth almost $11bn in 2007, 10 times as much as in 1982. Twenty-five years ago, aquaculture accounted for just over half the Atlantic salmon produced around the world. Today, farmed salmon represents 99.8% of the market. It's Scotland's largest food export, and since the Chinese fell out with the Norwegians last year, the Scots have found a new and potentially vastly lucrative market.

Farmed salmon is almost as notorious as battery chicken and pigs in farrowing crates. A 2004 study in Science found that aquacultured salmon (especially Scottish) contained increased levels of chlorine, and a subsequent study the following year revealed that the fish from salmon farms contained up to 10 times the levels of pesticides, dioxins and the notorious carcinogens PCBs. The study concluded that "consumers should not eat farmed [salmon] from Scotland, Norway and eastern Canada more than three times a year".

The farms help to spread parasites and diseases such as sea lice and infectious salmon anaemia, which can destroy an entire potential harvest in a matter of days. Heavy metals such as copper and zinc accumulate underneath salmon farms in the absence of a current strong enough to remove them. Escaped salmon – at least 600,000 fled Scottish cages in 2004 alone (pdf) – can interbreed with native wild populations, shrinking the gene pool and further spreading disease. To support the farms requires a staggering and dwindling quantity of fishmeal, which further depletes stocks of other wild species. Of just as much concern to the ethically-minded consumer are the many commentators who say that "organic" farmed salmon is unworthy of the label, no better than its most lurid caged cousin.

Which puts those of us who love salmon, but who balk at its price when harvested wild, in something of a predicament. The environmental costs of the food should not be ignored, but neither should people hastily spurn one of the most delicious foods in nature. It's a sad, intractable story repeated too often in food and agriculture, with neither an obvious solution nor a clear and appealing future. Even the cheapest, fattiest, orangest farmed salmon can be delicious if handled skilfully. I admit that I'm reluctant to give up eating farmed salmon a couple of times a month, as I suspect are most food lovers prepared at times to sacrifice ethics for the palate.

Salmon is of course supremely versatile, not only the best smoked food (some of the most delicious I've tasted comes from John Ross) but marrying with almost every cuisine and a splendid range of flavours. Its fattiness appreciates the counterpoint of citrus and vinegar as well the calm crunch of English cucumber, and it goes beautifully with that greasiest of fruits, the avocado. Perhaps my favourite thing to accompany salmon is beetroot, whose strange sweet earthiness stunningly matches the fishy pink protein.