Preheat oven to 375 degrees F (190 degrees C). Grease 9x13 inch baking dish.
Melt margarine in a small skillet over med-high heat. Saute onion and garlic until tender, 4 to 6 minutes; set aside. In a large bowl, combine corn, cream style corn, salt and eggs. Beat in muffin mix. Fold in cooked onion mixture. Pour into prepared baking dish.
In a large bowl, combine chicken, green chiles, sour cream, salt and pepper. Spoon over corn mixture to within 1 inch from edge. Sprinkle top with cheese.
Bake in preheated oven for 35 to 40 minutes, or until edges are golden brown.