Preheat the oven to 350°F and place the butter in the baking dish. Melt it directly in the pan, then spread it evenly across the bottom and slightly up the sides to prevent sticking.
Add the drained whole kernel corn to the pan, followed by the creamed corn, making sure to include all of its liquid for moisture.
Spoon in the sour cream, then add the sugar and salt. Sprinkle the corn muffin mix over the top.
Using a spatula, gently stir everything together until well combined, making sure to scrape the edges so all ingredients are evenly incorporated.
Spread the mixture evenly in the pan and place it in the oven. Bake until the edges are golden brown and begin to pull away from the sides, and the center is set with only minimal movement when gently shaken.
Remove from the oven and allow it to cool for a few minutes before serving warm.