Bring first 6 ingredients to a boil in a medium saucepan; gradually whisk in grits. Cover, reduce heat, and simmer, whisking occasionally, 5 to 7 minutes. Add 1/2 cup cheese, stirring until cheese melts. Remove from heat, and let stand 10 minutes. Lightly beat 2 eggs, and stir into grits mixture; pour into a lightly greased 10-inch deep pie plate.
Bake at 350° for 20 minutes; remove from oven. Increase oven temperature to 400°.
Sauté ham and onions in a nonstick skillet over medium-high heat 5 minutes or until onion is tender. Layer ham mixture evenly over grits crust. Whisk together milk and remaining 6 eggs; pour over ham mixture. Sprinkle remaining 3/4 cup cheese evenly over egg mixture.
Bake at 400° for 35 minutes. Let stand 10 minutes, and cut into wedges. Garnish, if desired.