Preheat your oven to 325 degrees F.
Grease a 9x13 baking dish and set aside.
Melt 1 tablespoon of butter in a large skillet over medium high heat.
Add the onions and cook for 5 minutes, stirring occasionally.
Remove the onions from the skillet and set aside to cool.
In a medium bowl, whisk together the half and half, milk, salt, pepper, eggs, flour and sugar together.
Add the corn and sauteed onions to the bowl and stir.
Pour the corn mix into the greased baking pan and then place in the oven to cook for 30 minutes.
While the casserole is cooking, melt the remaining 4 tablespoons of butter.
Mix the crushed butter crackers together with the melted butter.
Remove the casserole dish from the oven then sprinkle the buttered crackers over the top of the casserole.
Return the casserole to the oven to bake for another 15 minutes. The top should be golden brown and completely set.
Let the scalloped corn cool for about 5 minutes then scoop and serve!