Preheat the oven to 450 degrees F. Spray an 8-inch square baking pan with vegetable oil cooking spray.
In a medium saucepan, melt the butter and saute the onion until tender, but not browned, for about 3 minutes. Remove the pan from the heat and add the muffin mix, egg, milk, sour cream, 1/2 cup of the cheese, the salt, and dill weed. Stir to combine. Pour into the prepared pan and top with the remaining 1/2 cup cheese. Bake for 30 minutes, until set and a toothpick inserted into the center of the cornbread comes out clean. Allow to cool slightly before cutting into squares.