From what I was tought, 생선 refers to any fish that will be consumed as food -- whether dead or alive. So if you see fish in a river and you plan on eating those very fish, you can refer to them as 생선. Likewise, if you go to a Korean fish market (where most of the fish are still alive), those fish are all also 생선. And then the cooked up fish on your plate is also 생선.
In the same vein, 물고기 is any fish that will not be consumed. So, your pet fish is a 물고기. The fish you plan to go fishing for and then release is also 물고기. But so is a dead fish you find washed up ashore (assuming you won't be eating said dead fish).